diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2019-10-16 03:57:08 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2019-10-21 20:35:54 -0300 |
commit | 982a98a0e3414109647f885baee1196ee4ffb455 (patch) | |
tree | c5a1803dea213560b63a41604261f34d92a5eac4 /doc | |
parent | 887db368212bb0a66360f70ad636cadbe310997b (diff) | |
download | ffmpeg-982a98a0e3414109647f885baee1196ee4ffb455.tar.gz |
avformat/matroskaenc: Fix memleak upon failure
The Matroska muxer up until now leaked memory in two scenarios:
1. If an error happened during writing the trailer, as
mkv_write_trailer() returned early without cleaning up.
2. If mkv_write_header() indicated success despite an error in the
underlying AVIOContext. In this case avformat_write_header() returned
the IO error and according to the API the caller is not allowed to call
av_write_trailer(), so that no cleanup happened for the allocations made
in mkv_write_header().
This has been fixed by using a dedicated deinit function.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions