ffmpeg | branch: master | Jacek Jendrzej <overx...@gmail.com> | Tue Aug  7 
11:32:05 2018 +0800| [0cf5e6b5b4e162efd71e0e331b0aa87d903517e3] | committer: 
Steven Liu

avformat/dashdec: Fix memleak when resolve_content_path

Can be reproduced with:  valgrind  --leak-check=full  -v ffmpeg -i
http://yt-dash-mse-test.commondatastorage.googleapis.com/media/motion-20120802-manifest.mpd

Reviewed-by: Steven Liu <l...@onvideo.cn>
Signed-off-by: Steven Liu <l...@chinaffmpeg.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0cf5e6b5b4e162efd71e0e331b0aa87d903517e3
---

 libavformat/dashdec.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index f0939f4425..c710e56727 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -754,9 +754,12 @@ static int resolve_content_path(AVFormatContext *s, const 
char *url, int *max_ur
         if (!(node = baseurl_nodes[rootId])) {
             continue;
         }
-        if (ishttp(xmlNodeGetContent(node))) {
+        text = xmlNodeGetContent(node);
+        if (ishttp(text)) {
+            xmlFree(text);
             break;
         }
+        xmlFree(text);
     }
 
     node = baseurl_nodes[rootId];

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to