[MPlayer-dev-eng] [PATCH][BUG] Incorrect memleak fix code in input/input.c might cause incorrect free

Alexander Strasser eclipse7 at gmx.net
Tue Aug 3 11:14:11 CEST 2004


On Tue, Aug 03, 2004 at 11:54:38AM +0300, Shachar Raindel wrote:
> On Tue, 3 Aug 2004 10:24:51 +0200, Alexander Strasser <eclipse7 at gmx.net> wrote:
> > OK, i knew i had some doubts and now i found why.
> > Please look at the attached patch and comment.
> 
> Yep, I agree that this was a bug in my original patch. What about this
> one? It is a bit more elegant IMHO, and you have only a single point
> in which you free this chunk of mem, which makes it a tiny little bit
> more clear... Don't know if this breaks buggy GCC compilers, and if I
> should care.
Dunno if it is really more elegant or more easy to follow.
Maybe someone else can say something about it ( maybe you
are right and one freeing point is better, thought about
that too ).

> Also, any particullar reason for having a prototype for get_path
> inside the file, instead of having a single prototype for all of the
> files that uses get_path, in a header file?
This is a mess IMHO. I noticed it while trying to fix these memleaks.
It is inlcuded in more than one file as get_path.c and is declared
extern or as a prototype or however you want to say it in some other
places too.

I think this should really be cleaned up... i'll start another thread
about it after this is fixed.

  Alex (beastd)




More information about the MPlayer-dev-eng mailing list