diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-19 06:32:42 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-21 04:32:00 +0200 |
commit | e7aea1fe7304352c4b5359159700ab4957b10449 (patch) | |
tree | 584569934fef654af5a9d0dc01044b2c4a2a0b2b /presets/libvpx-720p50_60.ffpreset | |
parent | 5c91701dc7f46975f9fb714d30c70a81dc0ce90a (diff) | |
download | ffmpeg-e7aea1fe7304352c4b5359159700ab4957b10449.tar.gz |
avformat/dashdec: Fix leak of string on error when parsing representation
The DASH demuxer currently extracts several strings at once from an xml
document before processing them one by one; these strings are allocated,
stored in local variables and need to be freed by the demuxer itself.
So if an error happens when processing one of them, all strings need to
be freed before returning. This has simply not been done, leading to
leaks.
A simple fix would be to add the necessary code for freeing; yet there is
a better solution: Avoid having several strings at the same time by
extracting a string, processing it and immediately freeing it. That way
one only has to free at most one string on error.
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'presets/libvpx-720p50_60.ffpreset')
0 files changed, 0 insertions, 0 deletions