Re: [FFmpeg-devel] [PATCH V1 1/4] lavfi/anequalizer: fix memory leak in error handling path
On Tue, Sep 10, 2019 at 9:06 PM Paul B Mahol wrote: > > lgtm > Will apply, Thanks ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH V1 1/4] lavfi/anequalizer: fix memory leak in error handling path
lgtm On 9/10/19, Jun Zhao wrote: > From: Jun Zhao > > free the pad.name in error handling path to avoid memory leak. > > Signed-off-by: Jun Zhao > --- > libavfilter/af_anequalizer.c |4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/libavfilter/af_anequalizer.c b/libavfilter/af_anequalizer.c > index 03d939f..ee82474 100644 > --- a/libavfilter/af_anequalizer.c > +++ b/libavfilter/af_anequalizer.c > @@ -205,8 +205,10 @@ static av_cold int init(AVFilterContext *ctx) > .type = AVMEDIA_TYPE_VIDEO, > .config_props = config_video, > }; > -if (!vpad.name) > +if (!vpad.name) { > +av_freep(); > return AVERROR(ENOMEM); > +} > } > > ret = ff_insert_outpad(ctx, 0, ); > -- > 1.7.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH V1 1/4] lavfi/anequalizer: fix memory leak in error handling path
From: Jun Zhao free the pad.name in error handling path to avoid memory leak. Signed-off-by: Jun Zhao --- libavfilter/af_anequalizer.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/libavfilter/af_anequalizer.c b/libavfilter/af_anequalizer.c index 03d939f..ee82474 100644 --- a/libavfilter/af_anequalizer.c +++ b/libavfilter/af_anequalizer.c @@ -205,8 +205,10 @@ static av_cold int init(AVFilterContext *ctx) .type = AVMEDIA_TYPE_VIDEO, .config_props = config_video, }; -if (!vpad.name) +if (!vpad.name) { +av_freep(); return AVERROR(ENOMEM); +} } ret = ff_insert_outpad(ctx, 0, ); -- 1.7.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".