diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-19 08:52:41 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-02-27 07:20:59 +0100 |
commit | 3c13a44dd40f17264ac498d17cc15f237785ba20 (patch) | |
tree | 2f3431cb9fbd0549809d7e90a146f3d49e7f3e6f /libavformat/segment.c | |
parent | 92898d7536b64d9e09da9a71d3322b65b5b04ef9 (diff) | |
download | ffmpeg-3c13a44dd40f17264ac498d17cc15f237785ba20.tar.gz |
avformat/dashdec: Fix memleaks on error to add representation to dynarray
Up until now, the DASH demuxer used av_dynarray_add() to add
audio/video/subtitles representations to arrays. Yet av_dynarray_add()
frees the array upon failure, leading to leaks of its elements;
furthermore, the element to be added leaks, too.
This has been fixed by using av_dynarray_add_nofree() instead and by
freeing the elements that could not be added to the list. Furthermore,
errors from this are now checked and returned.
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit d63f8c873bd65f4dfab852069fb5faf07cffe6aa)
Diffstat (limited to 'libavformat/segment.c')
0 files changed, 0 insertions, 0 deletions