[vlc-commits] commit: vod: fix memleak (Pierre Ynard )

git at videolan.org git at videolan.org
Tue Jun 15 19:44:29 CEST 2010


vlc/vlc-1.1 | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Tue Jun 15 01:35:30 2010 +0200| [a643c2b744007de69d37e786358bd94b0ed644cb] | committer: Pierre Ynard 

vod: fix memleak

Port c7690cec0129d2fb3198e60602c4894e728df092 to duplicated code
(cherry picked from commit f7ef9010f8c65b6a66a14c9c1000dc1f29f56027)

Signed-off-by: Pierre Ynard <linkfanel at yahoo.fr>

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

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

diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c
index 905f3dc..245b340 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -1242,12 +1242,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;



More information about the vlc-commits mailing list