#1860 pidfile() may leak memory on error
Closed: Fixed None Opened 7 years ago by jhrozek.

Found by new Coverity instance:

218    errno = 0;

9. noescape: Resource "fd" is not freed or pointed-to in function "sss_atomic_io_s(int, void *, size_t, bool)". [show details]
219    written = sss_atomic_write_s(fd, pid_str, size);

10. Condition "written == -1", taking true branch
220    if (written == -1) {
221        err = errno;

11. Condition "debug_level & __debug_macro_newlevel", taking true branch

12. Condition "debug_timestamps", taking true branch

13. Condition "debug_microseconds", taking true branch

14. Falling through to end of if statement

15. Falling through to end of if statement
222        DEBUG(SSSDBG_CRIT_FAILURE,
223              ("write failed [%d][%s]\n", err, strerror(err)));

CID 10031 (#1 of 1): Resource leak (RESOURCE_LEAK)16. leaked_handle: Handle variable "fd" going out of scope leaks the handle.
224        return err;
225    }

Fields changed

patch: 0 => 1
status: new => assigned

Fields changed

milestone: NEEDS_TRIAGE => SSSD 1.10.0
rhbz: => 0

Fields changed

milestone: SSSD 1.10.0 => SSSD 1.10 beta

resolution: => fixed
status: assigned => closed

Metadata Update from @jhrozek:
- Issue assigned to jhrozek
- Issue set to the milestone: SSSD 1.10 beta

3 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/2902

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