[MPlayer-cvslog] CVS: main/libvo vo_sdl.c,1.118,1.119
Oded Shimon
ods15 at ods15.dyndns.org
Tue Mar 1 17:29:04 CET 2005
On Tuesday 01 March 2005 18:24, Michael Niedermayer wrote:
> Hi
>
> On Tuesday 01 March 2005 12:24, Reimar Dצffinger wrote:
> > Hi,
> >
> > On Tue, Mar 01, 2005 at 04:51:50AM +0100, Ivo van Poorten CVS wrote:
> > > + if(sdl_driver) setenv("SDL_VIDEODRIVER", sdl_driver, 1);
> > > + free(sdl_driver);
> >
> > Most MPlayer code checks if a pointer is null before freeing - but
>
> IMHO a
> #define free(x) if(x) free(x)
> somewhere would be a better idea, or a mp_free() maybe ...
Heh, personally I would go beyond that with
#define mp_free(x) do { if (x) free(x); x = NULL; } while(0)
and also some mp_malloc that would call mp_free first etc...
but that's just me. :)
- ods15
More information about the MPlayer-cvslog
mailing list