diff options
author | Jacek Jendrzej <overx300@gmail.com> | 2018-08-07 11:32:05 +0800 |
---|---|---|
committer | Steven Liu <lq@chinaffmpeg.org> | 2018-08-07 12:31:55 +0800 |
commit | 0cf5e6b5b4e162efd71e0e331b0aa87d903517e3 (patch) | |
tree | 9b49c75c30094582549a91d04dde30a86867d627 | |
parent | 2f45378ba14417cbb4fc9494ba941cb06443c4f9 (diff) | |
download | ffmpeg-0cf5e6b5b4e162efd71e0e331b0aa87d903517e3.tar.gz |
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>
-rw-r--r-- | libavformat/dashdec.c | 5 |
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]; |