Hi Eric,

On Sun, 1 May 2016, Eric Sunshine wrote:

> On Sun, Apr 24, 2016 at 9:34 AM, Christian Couder
> <christian.cou...@gmail.com> wrote:
> > Signed-off-by: Christian Couder <chrisc...@tuxfamily.org>
> > ---
> > diff --git a/builtin/apply.c b/builtin/apply.c
> > @@ -4562,12 +4562,12 @@ static int apply_all_patches(struct apply_state 
> > *state,
> >
> >                 fd = open(arg, O_RDONLY);
> >                 if (fd < 0)
> > -                       die_errno(_("can't open patch '%s'"), arg);
> > +                       return error(_("can't open patch '%s': %s"), arg, 
> > strerror(errno));
> >                 read_stdin = 0;
> >                 set_default_whitespace_mode(state);
> >                 res = apply_patch(state, fd, arg, options);
> >                 if (res < 0)
> > -                       exit(1);
> > +                       return -1;
> 
> This leaks 'fd', doesn't it?

Indeed it does. I thought that I had sent a mail about fd leakage, just
resent it. Such a leakage prevented the test suite from passing after
applying this patch series on Windows and patching up several obvious
compile problems.

Ciao,
Dscho
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to