From Coverity:
444 DLIST_FOR_EACH(common, ctx->server_common_list) { 445 if (!strcasecmp(name, common->name)) { Directly dereferencing pointer "_common". 446 *_common = rc_reference(mem_ctx, struct server_common, common); Dereferencing "_common" before a null check. 447 if (_common == NULL) 448 return ENOMEM; 449 return EOK; 450 } 451 }
The check here should be if (*_common == NULL)
There's no need to check for _common == NULL earlier, as it's implicit in DLIST_FOR_EACH()
Fields changed
owner: somebody => jhrozek
status: new => assigned
milestone: NEEDS_TRIAGE => SSSD 1.2.1
Fixed by 83aa1c2629eb7600dd2b6b207daa709a333e2720
fixedin: => 1.2.1 keywords: => coverity resolution: => fixed status: assigned => closed
rhbz: => 0
Metadata Update from @sgallagh: - Issue assigned to jhrozek - Issue set to the milestone: SSSD 1.2.1
SSSD is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in SSSD's github repository.
This issue has been cloned to Github and is available here: - https://github.com/SSSD/sssd/issues/1560
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.