Commit 27808e12 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

vlc_arrays.h: Sanity check.

parent 9afe6008
...@@ -304,12 +304,14 @@ static inline void vlc_array_clear( vlc_array_t * p_array ) ...@@ -304,12 +304,14 @@ static inline void vlc_array_clear( vlc_array_t * p_array )
static inline vlc_array_t * vlc_array_new( void ) static inline vlc_array_t * vlc_array_new( void )
{ {
vlc_array_t * ret = (vlc_array_t *)malloc( sizeof(vlc_array_t) ); vlc_array_t * ret = (vlc_array_t *)malloc( sizeof(vlc_array_t) );
vlc_array_init( ret ); if( ret ) vlc_array_init( ret );
return ret; return ret;
} }
static inline void vlc_array_destroy( vlc_array_t * p_array ) static inline void vlc_array_destroy( vlc_array_t * p_array )
{ {
if( !p_array )
return;
vlc_array_clear( p_array ); vlc_array_clear( p_array );
free( p_array ); free( p_array );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment