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>
pull/352/head
Andreas Rheinhardt 5 years ago
parent 248ef276be
commit 01a4c35969
  1. 2
      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);

Loading…
Cancel
Save