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

Moritz Bunkus moritz at bunkus.org
Mon Jul 26 11:10:41 CEST 2004


Hi,

> -  file = config_file[0] != '/' ? get_path(config_file) : config_file;
> +  tmpbufptr = get_path(config_file);
> +  file = config_file[0] != '/' ? tmpbufptr : config_file;

...

Why not just use
    file = config_file[0] != '/' ? get_path(config_file) : strdup(config_file);
?

Mosu

-- 
If Darl McBride was in charge, he'd probably make marriage
unconstitutional too, since clearly it de-emphasizes the commercial
nature of normal human interaction, and probably is a major impediment
to the commercial growth of prostitution. - Linus Torvalds




More information about the MPlayer-dev-eng mailing list