mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
r16383: Klocwork #1086. No null deref.
Jeremy.
(This used to be commit 7b68a2acfc
)
This commit is contained in:
parent
795c99d6b8
commit
684dd7f2cf
@ -1470,6 +1470,11 @@ static BOOL lookup_global_sam_rid(TALLOC_CTX *mem_ctx, uint32 rid,
|
||||
|
||||
unbecome_root(); /* -----> EXIT BECOME_ROOT() */
|
||||
*name = talloc_strdup(mem_ctx, pdb_get_username(sam_account));
|
||||
if (!*name) {
|
||||
TALLOC_FREE(sam_account);
|
||||
return False;
|
||||
}
|
||||
|
||||
*psid_name_use = SID_NAME_USER;
|
||||
|
||||
TALLOC_FREE(sam_account);
|
||||
|
Loading…
Reference in New Issue
Block a user