[MPlayer-cvslog] CVS: main/libvo vo_sdl.c,1.118,1.119
    Alexander Strasser 
    eclipse7 at gmx.net
       
    Tue Mar  1 17:38:01 CET 2005
    
    
  
Michael Niedermayer wrote ( On Tue, Mar 01, 2005 at 05:24:09PM +0100 ):
> 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 ...
What is this good for?
I always thought freeing a NULL pointer was safe and even guaranteed
to be so by the standard. But of course i may be wrong, this is why
I ask for the reason? Are there systems where it isn't save to free
NULL pointers? Or are there performance considerations behind it?
Of course then it wouldn't matter in this case.
  Alex (beastd)
    
    
More information about the MPlayer-cvslog
mailing list