[vlc-commits] RAM: fix memleaks

Jean-Baptiste Kempf git at videolan.org
Sat Apr 23 02:48:36 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Apr 23 02:32:38 2011 +0200| [cfbff7bd353d805d42299b30211b2aabb7b493ee] | committer: Jean-Baptiste Kempf

RAM: fix memleaks

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

 modules/demux/playlist/ram.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/modules/demux/playlist/ram.c b/modules/demux/playlist/ram.c
index 1f6e527..cc2af9b 100644
--- a/modules/demux/playlist/ram.c
+++ b/modules/demux/playlist/ram.c
@@ -294,7 +294,10 @@ static int Demux( demux_t *p_demux )
                         if( i_start )
                         {
                             if( asprintf( &temp, ":start-time=%d", i_start ) != -1 )
+                            {
                                 INSERT_ELEM( ppsz_options, i_options, i_options, temp );
+                                free( temp );
+                            }
                         }
                     }
                     else if( !strcmp( psz_param, "end" ) )
@@ -304,7 +307,10 @@ static int Demux( demux_t *p_demux )
                         if( i_stop )
                         {
                             if( asprintf( &temp, ":stop-time=%d", i_stop ) != -1 )
+                            {
                                 INSERT_ELEM( ppsz_options, i_options, i_options, temp );
+                                free( temp );
+                            }
                         }
                     }
                     else if( !strcmp( psz_param, "title" ) )



More information about the vlc-commits mailing list