Message ID | AM7PR03MB66601C9C426DAF6F83CBA00C8FEE9@AM7PR03MB6660.eurprd03.prod.outlook.com |
---|---|
State | Accepted |
Commit | 2f4b43a5a153e44476603a9cef30a1f1a08d749f |
Headers | show |
Series | [FFmpeg-devel,1/6] avfilter/af_aderivative: Don't use audiobuf for only 1 sample, fix leak | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
Andreas Rheinhardt: > AVFilter.uninit is called automatically if init fails. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> > --- > libavfilter/vf_paletteuse.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/libavfilter/vf_paletteuse.c b/libavfilter/vf_paletteuse.c > index f07ef5d760..4e90927322 100644 > --- a/libavfilter/vf_paletteuse.c > +++ b/libavfilter/vf_paletteuse.c > @@ -1076,11 +1076,8 @@ static av_cold int init(AVFilterContext *ctx) > > s->last_in = av_frame_alloc(); > s->last_out = av_frame_alloc(); > - if (!s->last_in || !s->last_out) { > - av_frame_free(&s->last_in); > - av_frame_free(&s->last_out); > + if (!s->last_in || !s->last_out) > return AVERROR(ENOMEM); > - } > > s->set_frame = set_frame_lut[s->color_search_method][s->dither]; > > Will apply patches 2-6 of this patchset. - Andreas
diff --git a/libavfilter/vf_paletteuse.c b/libavfilter/vf_paletteuse.c index f07ef5d760..4e90927322 100644 --- a/libavfilter/vf_paletteuse.c +++ b/libavfilter/vf_paletteuse.c @@ -1076,11 +1076,8 @@ static av_cold int init(AVFilterContext *ctx) s->last_in = av_frame_alloc(); s->last_out = av_frame_alloc(); - if (!s->last_in || !s->last_out) { - av_frame_free(&s->last_in); - av_frame_free(&s->last_out); + if (!s->last_in || !s->last_out) return AVERROR(ENOMEM); - } s->set_frame = set_frame_lut[s->color_search_method][s->dither];
AVFilter.uninit is called automatically if init fails. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavfilter/vf_paletteuse.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)