From: Andrew Bartlett Date: Fri, 11 Feb 2011 00:34:56 +0000 (+1100) Subject: s3-auth Fix memory leak in security=share and force user = X-Git-Tag: tevent-0.9.11~639 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1354d3dc747344390302e3fd2a202ff372985a9c;p=thirdparty%2Fsamba.git s3-auth Fix memory leak in security=share and force user = 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 Autobuild-Date: Wed Feb 16 01:08:19 CET 2011 on sn-devel-104 --- diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 76736646974..1c036ff1244 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -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; }