#1860 pidfile() may leak memory on error
Closed: Fixed None Opened 5 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

2 years ago

Login to comment on this ticket.

Metadata