]> git.sesse.net Git - vlc/commitdiff
Use malloc(1) as cookie rather than malloc(0)
authorRémi Denis-Courmont <rem@videolan.org>
Thu, 1 May 2008 18:24:07 +0000 (21:24 +0300)
committerRémi Denis-Courmont <rem@videolan.org>
Thu, 1 May 2008 18:24:07 +0000 (21:24 +0300)
malloc(0) can legally be NULL (or not unique).

modules/stream_out/dummy.c

index 94a384cbda39a356aa3d4bdb5d07bc3788004fcf..d3da5671d2e21153a02cba1a34af827ca471db80 100644 (file)
@@ -80,7 +80,7 @@ static void Close( vlc_object_t * p_this )
 static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
 {
     VLC_UNUSED(p_stream); VLC_UNUSED(p_fmt);
-    return malloc( 0 );
+    return malloc( 1 );
 }
 
 static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )