]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r22024: Don't leak, actually use the provided memory context...
authorAndrew Bartlett <abartlet@samba.org>
Mon, 2 Apr 2007 06:57:37 +0000 (06:57 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:19:03 +0000 (12:19 -0500)
source/lib/util_pw.c

index fcbdd941fea56e3ac005164a0cff99fe9bc02e13..d6dfbd50169be4c3862ba79c287ffe4559a47d06 100644 (file)
@@ -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)