[MPlayer-dev-eng] [PATCH][BUG] Incorrect memleak fix code in input/input.c might cause incorrect free
Alexander Strasser
eclipse7 at gmx.net
Mon Jul 26 11:31:35 CEST 2004
Hi,
On Mon, Jul 26, 2004 at 12:01:12PM +0300, Shachar Raindel wrote:
> I attach a patch to fix the memleak fix patch aplied lately. The
> patch applied didn't handle the case in which the config_file starts
> with a '/', in which it will try to free a global array, which will
> cause BadThing[TM] to happen.
right :(
I have to learn to read the code more thoroughly next time.
Just a view things:
> if( mp_input_parse_config(file)) {
> - free(file); // release the buffer created by get_path()
> + // free(file); // release the buffer created by get_path()
> }
> else {
This doesn't look to nice, but maybe i'm blind again.
I would suggest:
if( !mp_input_parse_config(file)) {
> + free(tmpbufptr);
Maybe the freeing comment should be appended here.
Alex (beastd)
More information about the MPlayer-dev-eng
mailing list