#48398 Coverity defect 13352 - Resource leak in auditlog.c
Closed: wontfix None Opened 8 years ago by firstyear.

  1. Condition config_get_auditfaillog() == NULL, taking false branch
  2. alloc_fn: Storage is returned from allocation function config_get_auditfaillog. [show details]
  3. noescape: Resource config_get_auditfaillog() is not freed or pointed-to in strlen.
  4. Condition strlen(config_get_auditfaillog()) == 0, taking true branch
    CID 13352 (#1 of 1): Resource leak (RESOURCE_LEAK)8. leaked_storage: Failing to save or free storage allocated by config_get_auditfaillog() leaks it.
    132 if (config_get_auditfaillog() == NULL || strlen(config_get_auditfaillog()) == 0) {

config_get_auditfaillog allocates a char* ptr and returns it. This if statement doesn't free that.


You don't need to check for NULL before calling:

{{{
slapi_ch_free_string(&auditfail_config);
}}}

commit 24c7896

Total 27 (delta 21), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
ab6501a..aa20634 master -> master

Metadata Update from @firstyear:
- Issue assigned to firstyear
- Issue set to the milestone: 1.3.5 backlog

7 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/1729

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 Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

3 years ago

Login to comment on this ticket.

Metadata