]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r22023: I don't like this cache, but I think Jeremy is right, the consequences
authorAndrew Bartlett <abartlet@samba.org>
Mon, 2 Apr 2007 06:26:16 +0000 (06:26 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:19:03 +0000 (12:19 -0500)
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

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