diff options
-rw-r--r-- | source4/ntvfs/ntvfs_interface.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 6ab5aad790..6a711bc3bd 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -35,7 +35,11 @@ NTSTATUS ntvfs_connect(struct smbsrv_request *req, const char *sharename) NTSTATUS ntvfs_disconnect(struct smbsrv_tcon *tcon) { - struct ntvfs_module_context *ntvfs = tcon->ntvfs_ctx->modules; + struct ntvfs_module_context *ntvfs; + if (tcon->ntvfs_ctx == NULL) { + return NT_STATUS_INVALID_CONNECTION; + } + ntvfs = tcon->ntvfs_ctx->modules; if (!ntvfs->ops->disconnect) { return NT_STATUS_NOT_IMPLEMENTED; } |