summaryrefslogtreecommitdiff
path: root/libavformat/dashdec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-07 20:32:51 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-21 04:31:26 +0200
commit01a4c3596942dad396834fea155173590687c59d (patch)
tree05a0a7efa2d4b32fb28d9eaa93b998f7d449dc0f /libavformat/dashdec.c
parent248ef276beb8222bc2610484b830420e1a306d8b (diff)
avformat/dashdec: Don't leave representation in inconsistent state on error
This currently doesn't cause any trouble, because the only caller did not clean up the representation upon error at all; but fixing this is a prerequisite for doing so. Reviewed-by: Steven Liu <lq@chinaffmpeg.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/dashdec.c')
-rw-r--r--libavformat/dashdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index f81b323d96..d84da16dbd 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -627,7 +627,7 @@ static int parse_manifest_segmenturlnode(AVFormatContext *s, struct representati
initialization_val);
if (!rep->init_section->url) {
- av_free(rep->init_section);
+ av_freep(&rep->init_section);
xmlFree(initialization_val);
xmlFree(range_val);
return AVERROR(ENOMEM);