[vlc-devel] commit: Don't use FREENULL when that's not needed and don' t free NULL just for fun. ( Rémi Duraffort )

Rémi Duraffort ivoire at via.ecp.fr
Wed Sep 17 20:39:04 CEST 2008


Le mercredi 17 septembre 2008 à 02:27:19, Bill C. Riemers a écrit :
> The reason for FREENULL is because not all platforms correctly ignore
> free(NULL).   I hope you are certain all the platforms VLC is built on
> do correctly handle free(NULL).  
Yes we consider that all systems knows free(NULL) == nop

But here that's not the same problem becuse FREENULL is defined as:
#define FREENULL(a) do { free( a ); a = NULL; }while(0)
This way FREENULL is just to avoid a double free.

But thanks for looking at the commits.

-- 
ivoire | Rémi Duraffort



More information about the vlc-devel mailing list