• Andreas Rheinhardt's avatar
    avformat/matroskaenc: Fix memleak upon failure · 982a98a0
    Andreas Rheinhardt authored
    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: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
    982a98a0
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...