[MPlayer-dev-eng] review of mplayer application
Joey Parrish
joey at nicewarrior.org
Tue Apr 1 20:36:40 CEST 2003
On Tue, Apr 01, 2003 at 03:53:57PM +0200, Colin Leroy wrote:
> > I have some quick fix :
> > while(playtree_iter != NULL) {
> > + if (filename != NULL)
> > + free(filename);
>
> i'd make it
> if (filename != NULL) {
> free(filename);
> filename = NULL;
> }
>
> just to be sure it won't be double-freed, but maybe it's useless.
Since the next line after the if() free(); is a filename =, it's
pointless. You'd be setting it to NULL, then setting it to something
else, which may be NULL, and then the next line is checking to see if
the function call returned NULL. No need for the extra line.
--Joey
More information about the MPlayer-dev-eng
mailing list