[vlc-devel] commit: Fix memleak (CID 225) ( Rémi Duraffort )

git version control git at videolan.org
Wed Oct 1 21:40:01 CEST 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Oct  1 21:34:17 2008 +0200| [c7690cec0129d2fb3198e60602c4894e728df092] | committer: Rémi Duraffort 

Fix memleak (CID 225)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c7690cec0129d2fb3198e60602c4894e728df092
---

 modules/misc/rtsp.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/misc/rtsp.c b/modules/misc/rtsp.c
index d487f23..ed31c53 100644
--- a/modules/misc/rtsp.c
+++ b/modules/misc/rtsp.c
@@ -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;




More information about the vlc-devel mailing list