summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)