Make us clean under valgrind --leak-check=full by using talloc_autofree_context(...
[kai/samba.git] / source3 / lib / util_pw.c
index c0d37f1094b7c3c80fb88ac7c1f4f81e31bba67b..e0dbc97f0056093461ac676026662e5560093d42 100644 (file)
@@ -57,7 +57,7 @@ struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name)
                return NULL;
        }
 
-       cached = tcopy_passwd(NULL, temp);
+       cached = tcopy_passwd(talloc_autofree_context(), temp);
        if (cached == NULL) {
                /*
                 * Just don't add this into the cache, ignore the failure