summaryrefslogtreecommitdiff
path: root/libavcodec/flacenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-11-29 22:28:37 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-02 18:55:27 +0200
commit56bd071e5487fcf516d942bbc84d7a77b0bdf9b6 (patch)
tree5b88791f981380390c62a6aa63b3e5a73f716643 /libavcodec/flacenc.c
parentd789d72d30d8cb6c0a9b5b1140589da1eae44e1e (diff)
avcodec/flacenc: Fix memleak upon init error
An AVMD5 struct would leak if an error happened after its allocation. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/flacenc.c')
-rw-r--r--libavcodec/flacenc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index 34fcd95795..05a85d830f 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -1513,4 +1513,5 @@ AVCodec ff_flac_encoder = {
AV_SAMPLE_FMT_S32,
AV_SAMPLE_FMT_NONE },
.priv_class = &flac_encoder_class,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
};