diff options
-rw-r--r-- | source4/smb_server/service.c | 4 |
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; } |