diff mbox series

[FFmpeg-devel,112/134] avcodec/flacenc: Fix memleak upon init error

Message ID 20201130005454.110441-40-andreas.rheinhardt@gmail.com
State Accepted
Commit 56bd071e5487fcf516d942bbc84d7a77b0bdf9b6
Headers show
Series [FFmpeg-devel,01/45] avcodec/a64multienc: Fix memleak upon init failure
Related show

Checks

Context Check Description
andriy/x86 warning Failed to apply patch

Commit Message

Andreas Rheinhardt Nov. 30, 2020, 12:54 a.m. UTC
An AVMD5 struct would leak if an error happened after its allocation.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavcodec/flacenc.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Andreas Rheinhardt April 2, 2021, 4:28 p.m. UTC | #1
On Mon, Nov 30, 2020 at 1:56 AM Andreas Rheinhardt <
andreas.rheinhardt@gmail.com> wrote:

> An AVMD5 struct would leak if an error happened after its allocation.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavcodec/flacenc.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
> index 8e7dbc52b4..a2aa4bdf17 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,
>  };
> --
> 2.25.1
>
>
Will apply.

- Andreas
diff mbox series

Patch

diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index 8e7dbc52b4..a2aa4bdf17 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,
 };