]> git.sesse.net Git - vlc/commitdiff
vod: fix memleak
authorPierre Ynard <linkfanel@yahoo.fr>
Mon, 14 Jun 2010 23:35:30 +0000 (01:35 +0200)
committerPierre Ynard <linkfanel@yahoo.fr>
Mon, 14 Jun 2010 23:35:30 +0000 (01:35 +0200)
Port c7690cec0129d2fb3198e60602c4894e728df092 to duplicated code

modules/stream_out/rtp.c

index b5ef13d3a603b08ef09f09cd1e06282c072b9301..0d6779c0ce8cd3a175dc5fd061a688995fbee527 100644 (file)
@@ -1243,12 +1243,14 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
 
                     if( i_nal_type == 7 )
                     {
+                        free( p_64_sps );
                         p_64_sps = vlc_b64_encode_binary( p_buffer, i_size );
                         /* XXX: nothing ensures that i_size >= 4 ?? */
                         sprintf_hexa( hexa, &p_buffer[1], 3 );
                     }
                     else if( i_nal_type == 8 )
                     {
+                        free( p_64_pps );
                         p_64_pps = vlc_b64_encode_binary( p_buffer, i_size );
                     }
                     i_buffer -= i_size;