summaryrefslogtreecommitdiff
path: root/libavformat/dashdec.c
diff options
context:
space:
mode:
authorJacek Jendrzej <overx300@gmail.com>2018-08-07 11:32:05 +0800
committerSteven Liu <lq@chinaffmpeg.org>2018-08-07 12:31:55 +0800
commit0cf5e6b5b4e162efd71e0e331b0aa87d903517e3 (patch)
tree9b49c75c30094582549a91d04dde30a86867d627 /libavformat/dashdec.c
parent2f45378ba14417cbb4fc9494ba941cb06443c4f9 (diff)
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>
Diffstat (limited to 'libavformat/dashdec.c')
-rw-r--r--libavformat/dashdec.c5
1 files changed, 4 insertions, 1 deletions
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];