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>
This commit is contained in:
Jacek Jendrzej 2018-08-07 11:32:05 +08:00 committed by Steven Liu
parent 2f45378ba1
commit 0cf5e6b5b4
1 changed files with 4 additions and 1 deletions

View File

@ -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];