summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-08-04 21:00:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:31:14 -0500
commit94efb6f70efd7d3f2f5740cf0998f23bb9624546 (patch)
tree9e8ca818cee15d9c72a0d8e9da9abf033692494e /source4
parentc11e266cba9e850382f5c5e4a0d927b183906e66 (diff)
downloadsamba-94efb6f70efd7d3f2f5740cf0998f23bb9624546.tar.gz
samba-94efb6f70efd7d3f2f5740cf0998f23bb9624546.tar.bz2
samba-94efb6f70efd7d3f2f5740cf0998f23bb9624546.zip
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)
Diffstat (limited to 'source4')
-rw-r--r--source4/ntvfs/ntvfs_interface.c6
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;
}