Browse Source

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 <lq@onvideo.cn>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
tags/n4.1
Jacek Jendrzej Steven Liu 7 years ago
parent
commit
0cf5e6b5b4
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      libavformat/dashdec.c

+ 4
- 1
libavformat/dashdec.c View File

@@ -754,9 +754,12 @@ static int resolve_content_path(AVFormatContext *s, const char *url, int *max_ur
if (!(node = baseurl_nodes[rootId])) { if (!(node = baseurl_nodes[rootId])) {
continue; continue;
} }
if (ishttp(xmlNodeGetContent(node))) {
text = xmlNodeGetContent(node);
if (ishttp(text)) {
xmlFree(text);
break; break;
} }
xmlFree(text);
} }


node = baseurl_nodes[rootId]; node = baseurl_nodes[rootId];


Loading…
Cancel
Save