From d716a9bd06f1d752bd98dfe210133cec601ab617 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 9 May 2012 10:30:47 +0200 Subject: s3: Fix Coverity ID 242184 Dereference after null check rpc_query_user unconditionally dereferences user_info if successfull --- source3/winbindd/winbindd_samr.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'source3') 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) { -- cgit