mirror of
https://github.com/samba-team/samba.git
synced 2024-12-29 11:21:54 +03:00
sys_pwnam doesn't return talloced memory, so don't mix up the returned struct.
(cherry picked from commit eb99923991
)
This commit is contained in:
parent
4c7033df5d
commit
1b41f670fc
@ -59,10 +59,7 @@ struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name)
|
||||
|
||||
cached = tcopy_passwd(talloc_autofree_context(), temp);
|
||||
if (cached == NULL) {
|
||||
/*
|
||||
* Just don't add this into the cache, ignore the failure
|
||||
*/
|
||||
return temp;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcache_add_talloc(NULL, GETPWNAM_CACHE, data_blob_string_const_null(name),
|
||||
|
Loading…
Reference in New Issue
Block a user