libutil: pidfile_ functions may cause leaks

hiren panchasara hiren at freebsd.org
Fri Sep 26 19:12:43 UTC 2014


On Tue, Sep 2, 2014 at 3:30 AM, Kal <b17c0de at gmail.com> wrote:
> Hi,
> If pidfile_write fails calling ftruncate or pwrite then pfh->pf_fd is
> set to -1. This will cause pidfile_close and pidfile_remove to both
> error out without actually freeing the pfh pointer. I have attached a
> patch which will make pidfile_close and pidfile_remove always cause pfh
> to be freed.
> Thanks!

Thank you for your patch. Can you please throw this into a bugzilla
ticket so it doesn't get lost?

https://bugs.freebsd.org/bugzilla/

cheers,
Hiren


More information about the freebsd-bugs mailing list