#518 Incorrect NULL check in get_server_common()
Closed: Fixed Opened by sgallagh.

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

Fields changed

status: new => assigned

Fields changed

milestone: NEEDS_TRIAGE => SSSD 1.2.1

Fixed by 83aa1c2629eb7600dd2b6b207daa709a333e2720

fixedin: => 1.2.1
keywords: => coverity
resolution: => fixed
status: assigned => closed

Fields changed

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.

Thank you for understanding. We apologize for all inconvenience.

Metadata