summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-04-02 06:26:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:03 -0500
commitddf759c533f8869c319c726ee1773f969c54a487 (patch)
tree211ded325f34c5428c77f5886bd22ee5efe10a94 /source3/lib
parentccc06f84415a0496b8f3771e8888f81442acd808 (diff)
downloadsamba-ddf759c533f8869c319c726ee1773f969c54a487.tar.gz
samba-ddf759c533f8869c319c726ee1773f969c54a487.tar.bz2
samba-ddf759c533f8869c319c726ee1773f969c54a487.zip
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 (This used to be commit 82667bc75e63292c61f73c1f7cde809cc3dd55b0)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util_pw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/util_pw.c b/source3/lib/util_pw.c
index 8b3c78a3f9..fcbdd941fe 100644
--- a/source3/lib/util_pw.c
+++ b/source3/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)