aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-10-17 15:18:00 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-27 07:20:58 +0100
commit51faa4bd60f0a548c6a4613bf30d645b8ff55e7c (patch)
tree1bdbfe1fcaf397e4d9e03c50cb99595e464045db /doc/examples
parentb4a96efdda22e3f0e0e4f1e3fcfe556d3b4639fb (diff)
downloadffmpeg-51faa4bd60f0a548c6a4613bf30d645b8ff55e7c.tar.gz
avcodec/movtextdec: Fix leaks on (re)allocation failure
Up until now, the 3GPP Timed Text decoder used av_dynarray_add() for a list of style entries. Said entries are individually allocated and owned by the pointers in the dynamic array and are therefore unsuitable for av_dynarray_add() which simply frees the array, but not the entries on error. In this case the intended new entry also leaks because it has been forgotten to free it. This commit fixes this. It is now allocated in one go and not reallocated multiple times (and it won't be overallocated any more). After all, the final number of elements (pending errors) is already known in advance. Furthermore, the style entries are now the entries of the new array, i.e. they are no longer allocated separately. This also removes one level of indirection. Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> (cherry picked from commit 94ad68ee17420996c9b003f142717d82b52c0915)
Diffstat (limited to 'doc/examples')
0 files changed, 0 insertions, 0 deletions