]> git.sesse.net Git - vlc/commitdiff
Fix memleak (CID 225)
authorRémi Duraffort <ivoire@videolan.org>
Wed, 1 Oct 2008 19:34:17 +0000 (21:34 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Wed, 1 Oct 2008 19:34:17 +0000 (21:34 +0200)
modules/misc/rtsp.c

index d487f2385dbb544cf70769fad99db9e5830e0c14..ed31c534b3bad63b8cc6d9e8e8cfab53c8c89d05 100644 (file)
@@ -593,11 +593,13 @@ static int MediaAddES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt )
                     }
                     if( i_nal_type == 7 )
                     {
+                        free( p_64_sps );
                         p_64_sps = vlc_b64_encode_binary( &p_buffer[4], i_size - 4 );
                         sprintf_hexa( hexa, &p_buffer[5], 3 );
                     }
                     else if( i_nal_type == 8 )
                     {
+                        free( p_64_pps );
                         p_64_pps = vlc_b64_encode_binary( &p_buffer[4], i_size - 4 );
                     }
                     i_buffer -= i_size;