diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-19 06:32:42 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-02-27 07:20:59 +0100 |
commit | ee0bf1d5f8794423dc3086c39b7e22ded65d5f31 (patch) | |
tree | 1933e591fd8849069a43e2644858ca7ce96820e2 /libavformat/tls_securetransport.c | |
parent | 74b97ea6034c75044c43b065df1fc07e5b2e4b84 (diff) | |
download | ffmpeg-ee0bf1d5f8794423dc3086c39b7e22ded65d5f31.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>
(cherry picked from commit e7aea1fe7304352c4b5359159700ab4957b10449)
Diffstat (limited to 'libavformat/tls_securetransport.c')
0 files changed, 0 insertions, 0 deletions