r8028: fix a crash bug in ulogoff, when the tree_connect failed before
authorStefan Metzmacher <metze@samba.org>
Thu, 30 Jun 2005 20:53:24 +0000 (20:53 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:19:00 +0000 (13:19 -0500)
metze

source/smb_server/service.c

index fefd0692fc73bfc3457577ca329ca40e464dd425..ff6f34061c5bf395e2efad12f122fb8cba1e1519 100644 (file)
@@ -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;
        }