summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-06-30 20:53:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:19:00 -0500
commit7134b64292a9e124d1280e61ef29810ac7e8c0b0 (patch)
treeb314d5ea71a38d2170baa60ee29c8b66057a8e8f
parent4e2ac8b458181b0eaf858a30e98aa7109e80d9d2 (diff)
downloadsamba-7134b64292a9e124d1280e61ef29810ac7e8c0b0.tar.gz
samba-7134b64292a9e124d1280e61ef29810ac7e8c0b0.tar.bz2
samba-7134b64292a9e124d1280e61ef29810ac7e8c0b0.zip
r8028: fix a crash bug in ulogoff, when the tree_connect failed before
metze (This used to be commit a2e34475d723eb74fc58b9afa9f4a863b1277b0d)
-rw-r--r--source4/smb_server/service.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/smb_server/service.c b/source4/smb_server/service.c
index fefd0692fc..ff6f34061c 100644
--- a/source4/smb_server/service.c
+++ b/source4/smb_server/service.c
@@ -80,6 +80,8 @@ static NTSTATUS make_connection_snum(struct smbsrv_request *req,
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("ntvfs_init_connection failed for service %s\n",
lp_servicename(tcon->service)));
+ req->tcon = NULL;
+ talloc_free(tcon);
return status;
}
@@ -87,6 +89,8 @@ static NTSTATUS make_connection_snum(struct smbsrv_request *req,
status = ntvfs_connect(req, lp_servicename(snum));
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("make_connection: NTVFS make connection failed!\n"));
+ req->tcon = NULL;
+ talloc_free(tcon);
return status;
}