1
0
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:
Jeremy Allison 2006-06-20 01:03:04 +00:00 committed by Gerald (Jerry) Carter
parent 795c99d6b8
commit 684dd7f2cf

View File

@ -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);