Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jun 2017 16:11:47 -0700
From:      Maxim Sobolev <sobomax@freebsd.org>
To:        "Conrad E. Meyer" <cem@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r320277 - head/usr.bin/mkuzip
Message-ID:  <CAH7qZfvqg0-J-O871dm7e--zd0w870UNiOrM1NKYd_fRMjAKCA@mail.gmail.com>
In-Reply-To: <CAG6CVpXN2QQVRdqyv5ED3X%2BRCW6sK10_fy9%2BX7hZ8kMRNf=9dA@mail.gmail.com>
References:  <201706231739.v5NHd05x039900@repo.freebsd.org> <CAG6CVpXN2QQVRdqyv5ED3X%2BRCW6sK10_fy9%2BX7hZ8kMRNf=9dA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Yeah, silly me. Thanks^2.

-Max

On Fri, Jun 23, 2017 at 3:54 PM, Conrad Meyer <cem@freebsd.org> wrote:

> One more nit.
>
> On Fri, Jun 23, 2017 at 10:39 AM, Maxim Sobolev <sobomax@freebsd.org>
> wrote:
> > Author: sobomax
> > Date: Fri Jun 23 17:39:00 2017
> > New Revision: 320277
> > URL: https://svnweb.freebsd.org/changeset/base/320277
> >
> > Log:
> >   Don't leak file descriptor in some cases.
> >
> >   Reported by:  cem
> >   MFC after:    6 weeks
> >
> > Modified:
> >   head/usr.bin/mkuzip/mkuz_insize.c
> >
> > Modified: head/usr.bin/mkuzip/mkuz_insize.c
> > ============================================================
> ==================
> > --- head/usr.bin/mkuzip/mkuz_insize.c   Fri Jun 23 17:31:07 2017
> (r320276)
> > +++ head/usr.bin/mkuzip/mkuz_insize.c   Fri Jun 23 17:39:00 2017
> (r320277)
> > @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$");
> >  #include <sys/stat.h>
> >  #include <err.h>
> >  #include <fcntl.h>
> > +#include <unistd.h>
> >
> >  #include "mkuz_cfg.h"
> >  #include "mkuz_insize.h"
> > @@ -58,12 +59,15 @@ mkuz_get_insize(struct mkuz_cfg *cfp)
> >                 ffd = open(statfsbuf.f_mntfromname, O_RDONLY);
> >                 if (ffd < 0) {
> >                         warn("open(%s, O_RDONLY)",
> statfsbuf.f_mntfromname);
> > +                       close(ffd);
>
> This one is wrong for obvious reasons.
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAH7qZfvqg0-J-O871dm7e--zd0w870UNiOrM1NKYd_fRMjAKCA>