From 46ff4e599e79f47254e05c7e4db75db9a19934bc Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 2 Apr 2007 06:57:37 +0000 Subject: [PATCH] r22024: Don't leak, actually use the provided memory context... --- source/lib/util_pw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.47.3