From: Andrew Bartlett Date: Mon, 2 Apr 2007 06:57:37 +0000 (+0000) Subject: r22024: Don't leak, actually use the provided memory context... X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~803 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=46ff4e599e79f47254e05c7e4db75db9a19934bc;p=thirdparty%2Fsamba.git r22024: Don't leak, actually use the provided memory context... --- diff --git a/source/lib/util_pw.c b/source/lib/util_pw.c index fcbdd941fea..d6dfbd50169 100644 --- a/source/lib/util_pw.c +++ b/source/lib/util_pw.c @@ -106,7 +106,7 @@ struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name) pwnam_cache[i] = tcopy_passwd(pwnam_cache, temp); - return tcopy_passwd(pwnam_cache, temp); + return tcopy_passwd(mem_ctx, temp); } struct passwd *getpwuid_alloc(TALLOC_CTX *mem_ctx, uid_t uid)