From 94efb6f70efd7d3f2f5740cf0998f23bb9624546 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 4 Aug 2005 21:00:38 +0000 Subject: r9074: cope with a null ntvfs context in disconnect, so the destructor that runs on a failed ntvfs init works (This used to be commit dac0be64c7cef18f6740053b3e6fe9a25df40c88) --- source4/ntvfs/ntvfs_interface.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/ntvfs/ntvfs_interface.c') 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; } -- cgit