]> git.sesse.net Git - vlc/commitdiff
Fixed initialization of asf_object_t inside ASF_ReadObject (fixed invalid
authorLaurent Aimar <fenrir@videolan.org>
Wed, 2 Jul 2008 17:04:50 +0000 (17:04 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 2 Jul 2008 19:57:30 +0000 (19:57 +0000)
free).
Removed useless memset after calloc.

modules/demux/asf/libasf.c

index b80b48823a8957e587e482ab94e72c9bd7870b60..3547308213c9b551af6b5f4aa1240137dda43b77 100644 (file)
@@ -619,8 +619,6 @@ static int ASF_ReadObject_codec_list( stream_t *s, asf_object_t *p_obj )
     {
         p_cl->codec = calloc( p_cl->i_codec_entries_count,
                               sizeof( asf_codec_entry_t ) );
-        memset( p_cl->codec, 0,
-                p_cl->i_codec_entries_count * sizeof( asf_codec_entry_t ) );
 
         p_data = p_peek + 44;
         for( i_codec = 0; i_codec < p_cl->i_codec_entries_count; i_codec++ )
@@ -1290,7 +1288,7 @@ static int ASF_ReadObject( stream_t *s, asf_object_t *p_obj,
     if( !p_obj )
         return( 0 );
 
-    memset( p_obj, 0, sizeof( p_obj ) );
+    memset( p_obj, 0, sizeof( *p_obj ) );
 
     if( ASF_ReadObjectCommon( s, p_obj ) )
     {