Date: Fri, 26 Sep 2014 12:12:41 -0700 From: hiren panchasara <hiren@freebsd.org> To: Kal <b17c0de@gmail.com> Cc: freebsd-bugs@freebsd.org Subject: Re: libutil: pidfile_ functions may cause leaks Message-ID: <CALCpEUG_uZASw5wQ5O8U3cLqiRD-=_aanyxWO0Oiwvj4RMAYsQ@mail.gmail.com> In-Reply-To: <54059C2C.9090204@gmail.com> References: <54059C2C.9090204@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 2, 2014 at 3:30 AM, Kal <b17c0de@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALCpEUG_uZASw5wQ5O8U3cLqiRD-=_aanyxWO0Oiwvj4RMAYsQ>