vlc | branch: master | Hugo Beauzée-Luyssen <[email protected]> | Thu Apr  6 
17:42:48 2017 +0200| [8268fe09d24583d94d1c1f9b100d9be6fb5f9509] | committer: 
Hugo Beauzée-Luyssen

shoutcast: Fix leak in case of missing end element.

CID #1253103

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

 modules/demux/playlist/shoutcast.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/modules/demux/playlist/shoutcast.c 
b/modules/demux/playlist/shoutcast.c
index c3e1c54..168be31 100644
--- a/modules/demux/playlist/shoutcast.c
+++ b/modules/demux/playlist/shoutcast.c
@@ -359,6 +359,16 @@ static int DemuxStation( demux_t *p_demux, xml_reader_t 
*p_xml_reader,
                 break;
         }
     }
-    /* FIXME: leaks on missing ENDELEMENT? */
+    /* Free all strings anyway, in case of missing end element */
+    FREENULL( psz_base );
+    FREENULL( psz_name );
+    FREENULL( psz_mt );
+    FREENULL( psz_id );
+    FREENULL( psz_br );
+    FREENULL( psz_genre );
+    FREENULL( psz_ct );
+    FREENULL( psz_lc );
+    FREENULL( psz_rt );
+    FREENULL( psz_load );
     return 0;
 }

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to