diff options
author | Jeremy Allison <jra@samba.org> | 2006-06-20 01:03:04 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:18:50 -0500 |
commit | 684dd7f2cf7af20e700167356abc77ad2bc38729 (patch) | |
tree | b6ce7584fdb76a0453de47755bbeb430e3ec1f4c | |
parent | 795c99d6b846cc24938323c1f69fd5c43050d758 (diff) | |
download | samba-684dd7f2cf7af20e700167356abc77ad2bc38729.tar.gz samba-684dd7f2cf7af20e700167356abc77ad2bc38729.tar.bz2 samba-684dd7f2cf7af20e700167356abc77ad2bc38729.zip |
r16383: Klocwork #1086. No null deref.
Jeremy.
(This used to be commit 7b68a2acfc583d1559c02461cab13419185bcd74)
-rw-r--r-- | source3/passdb/pdb_interface.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index 94adebe232..5d70c2c122 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -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); |