summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/util_pw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/util_pw.c b/source3/lib/util_pw.c
index d6dfbd5016..52054ce90a 100644
--- a/source3/lib/util_pw.c
+++ b/source3/lib/util_pw.c
@@ -74,7 +74,7 @@ struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name)
if ((pwnam_cache[i] != NULL) &&
(strcmp(name, pwnam_cache[i]->pw_name) == 0)) {
DEBUG(10, ("Got %s from pwnam_cache\n", name));
- return (struct passwd *)talloc_reference(mem_ctx, pwnam_cache[i]);
+ return tcopy_passwd(mem_ctx, pwnam_cache[i]);
}
}