@@ -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];
--
2.18.0
to
From 1fa3d049a17dd4d135bb79423e0551ee7ee7f25d Mon Sep 17 00:00:00 2001
From: Jacek Jendrzej <overx300@gmail.com>
Date: Wed, 1 Aug 2018 11:53:41 +0200
Subject: [PATCH] lavf/dashdec: Fix memleak
---
libavformat/dashdec.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
@@ -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);
+ xmlFree(text);
+ if (ishttp(text)) {
break;
}
}
node = baseurl_nodes[rootId];
--
2.18.0