summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-05-09 10:30:47 +0200
committerVolker Lendecke <vl@samba.org>2012-05-10 09:11:57 +0200
commitd716a9bd06f1d752bd98dfe210133cec601ab617 (patch)
tree32f1327cd1214004a4ef8d96b82e68d57f121b86 /source3
parent05e59739b30073173697974fcfebb871d04801ae (diff)
downloadsamba-d716a9bd06f1d752bd98dfe210133cec601ab617.tar.gz
samba-d716a9bd06f1d752bd98dfe210133cec601ab617.tar.bz2
samba-d716a9bd06f1d752bd98dfe210133cec601ab617.zip
s3: Fix Coverity ID 242184 Dereference after null check
rpc_query_user unconditionally dereferences user_info if successfull
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_samr.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source3/winbindd/winbindd_samr.c b/source3/winbindd/winbindd_samr.c
index c03f59381e..5994a354b5 100644
--- a/source3/winbindd/winbindd_samr.c
+++ b/source3/winbindd/winbindd_samr.c
@@ -317,11 +317,9 @@ static NTSTATUS sam_query_user(struct winbindd_domain *domain,
return NT_STATUS_NO_SUCH_USER;
}
- if (user_info) {
- user_info->homedir = NULL;
- user_info->shell = NULL;
- user_info->primary_gid = (gid_t) -1;
- }
+ user_info->homedir = NULL;
+ user_info->shell = NULL;
+ user_info->primary_gid = (gid_t) -1;
tmp_ctx = talloc_stackframe();
if (tmp_ctx == NULL) {