summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <[email protected]>2020-09-07 20:32:51 +0200
committerAndreas Rheinhardt <[email protected]>2021-02-27 07:20:59 +0100
commit6b7172bcd43ee5d1e5acd8fd24e73201744a9340 (patch)
tree0a4b8a3856d1e0e1a1c63c9ebf24b270f473eed7
parent9ec9fc351e667b108b5b5bafab04152b4a47638c (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 <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]> (cherry picked from commit 01a4c3596942dad396834fea155173590687c59d)
-rw-r--r--libavformat/dashdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 5180ba1786..636ce4105d 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);