On Thu, Mar 18, 2010 at 05:27:26PM +0100, Carlos R. Mafra wrote:
> > this seems to be in order.
> AFAICS in the rest of that function, it would leak in the 'else' case.
> Applied to #next, thanks!
OH NOES! Why???  Unapply please.

> > --- a/src/dialog.c
> > +++ b/src/dialog.c
> > @@ -289,10 +289,10 @@ static WMArray *GenerateVariants(const char *complete)
> >             if (*tmp == '~' && *(tmp + 1) == '/' && getenv("HOME")) {
> >                     dir = wstrdup(getenv("HOME"));
> >                     dir = wstrappend(dir, tmp + 1);
> > -                   wfree(tmp);
tmp contents added to recently-allocated dir, tmp is freed.

> >             } else {
> >                     dir = tmp;
dir points to tmp.

> >             }
> > +           wfree(tmp);
dir is freed too in "else" case.

> >             prefix = wstrdup(pos + 1);
> >             ScanFiles(dir, prefix, (unsigned)-1, 0, variants);
> >             wfree(dir);
And now it's freed for the second time in "else" case.

-- 
Regards,    --
Sir Raorn.   --- http://thousandsofhate.blogspot.com/

Attachment: signature.asc
Description: Digital signature

Reply via email to