From 82667bc75e63292c61f73c1f7cde809cc3dd55b0 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 2 Apr 2007 06:26:16 +0000 Subject: [PATCH] r22023: I don't like this cache, but I think Jeremy is right, the consequences of the talloc heirarchy created are too subtle, particularly with callers picking out individual members. This might fix the faults on the build farm. Andrew Bartlett --- source/lib/util_pw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/lib/util_pw.c b/source/lib/util_pw.c index 8b3c78a3f97..fcbdd941fea 100644 --- a/source/lib/util_pw.c +++ b/source/lib/util_pw.c @@ -105,8 +105,8 @@ struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name) } pwnam_cache[i] = tcopy_passwd(pwnam_cache, temp); - /* while keeping this in the cache, reference a copy for the caller */ - return (struct passwd *)talloc_reference(mem_ctx, pwnam_cache[i]); + + return tcopy_passwd(pwnam_cache, temp); } struct passwd *getpwuid_alloc(TALLOC_CTX *mem_ctx, uid_t uid) -- 2.11.4.GIT