s3-auth Fix memory leak in security=share and force user =
authorAndrew Bartlett <abartlet@samba.org>
Fri, 11 Feb 2011 00:34:56 +0000 (11:34 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 16 Feb 2011 00:08:19 +0000 (01:08 +0100)
In these cases, the server_info was not stolen onto a long term memory
context, and so remained on the NULL context where it was created.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Feb 16 01:08:19 CET 2011 on sn-devel-104

source3/auth/auth_util.c

index 76736646974bd40f239ecb5a8550915f9903a4ce..1c036ff1244162964920171c3881ec84fd85c64a 100644 (file)
@@ -819,7 +819,7 @@ NTSTATUS make_serverinfo_from_username(TALLOC_CTX *mem_ctx,
                return status;
        }
 
-       *presult = result;
+       *presult = talloc_steal(mem_ctx, result);
        return NT_STATUS_OK;
 }