[vlc-commits] demux: xspf: fix leak and broken logic (cid #1253125)

Francois Cartegnie git at videolan.org
Fri Jan 1 18:17:55 CET 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Jan  1 17:46:52 2016 +0100| [e6801f12213e640774194de3144458f05e074560] | committer: Francois Cartegnie

demux: xspf: fix leak and broken logic (cid #1253125)

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

 modules/demux/playlist/xspf.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/demux/playlist/xspf.c b/modules/demux/playlist/xspf.c
index 703d311..c2a771a 100644
--- a/modules/demux/playlist/xspf.c
+++ b/modules/demux/playlist/xspf.c
@@ -266,8 +266,9 @@ static bool parse_playlist_node COMPLEX_INTERFACE
 
     /* simple element content */
     case XML_READER_TEXT:
+        FREE_VALUE();
         psz_value = strdup(name);
-        if (unlikely(!name))
+        if (unlikely(!psz_value))
             goto end;
         break;
 



More information about the vlc-commits mailing list