#725 Uninitialized value error in set_local_and_remote_host_info
Closed: Fixed None Opened 10 years ago by sgallagh.

  166static errno_t set_local_and_remote_host_info(TALLOC_CTX *mem_ctx,
  167                                              size_t host_count,
  168                                              struct sysdb_attrs **host_list,
  169                                              const char *local_hostname,
  170                                              const char *remote_hostname,
  171                                              struct hbac_host_info **local_hhi,
  172                                              struct hbac_host_info **remote_hhi)
  173
  174{
  175    size_t c;
  176    int ret;
  177    struct hbac_host_info *hhi;
  178    struct ldb_message_element *el;
Declaring variable "tmp_ctx" without initializer.
  179    TALLOC_CTX *tmp_ctx;
  180
At conditional (1): "local_hostname == NULL" taking the true branch.
  181    if (local_hostname == NULL || *local_hostname == '\0') {
At conditional (2): "1 <= debug_level" taking the true branch.
At conditional (3): "debug_timestamps" taking the true branch.
  182        DEBUG(1, ("Missing local hostname.\n"));
  183        ret = EINVAL;
  184        goto done;
  185    }

...

  299done:
Using uninitialized value "tmp_ctx" when calling "_talloc_free".
  300    talloc_free(tmp_ctx);
  301    return ret;
  302}

Initialize tmp_ctx to NULL


Fields changed

milestone: NEEDS_TRIAGE => SSSD 1.5.1

Fields changed

coverity: => 10020

Fixed by f88099b

milestone: SSSD 1.5.1 => SSSD 1.5.0
resolution: => fixed
status: new => closed

Fields changed

rhbz: => 0

Metadata Update from @sgallagh:
- Issue assigned to sgallagh
- Issue set to the milestone: SSSD 1.5.0

4 years ago

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/1767

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.

Login to comment on this ticket.

Metadata