summaryrefslogtreecommitdiff
path: root/libavfilter/vf_colorconstancy.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-01-27 16:52:11 +0100
committerPaul B Mahol <onemda@gmail.com>2020-01-27 16:58:50 +0100
commit32ea6ffb165ebc64211518d1d1990a69eeba51a9 (patch)
tree163bc09e9b3912a3b0684c6159bda1b7c13a98f8 /libavfilter/vf_colorconstancy.c
parentdfc471488675aa257183745502d0074055db3bd2 (diff)
downloadffmpeg-32ea6ffb165ebc64211518d1d1990a69eeba51a9.tar.gz
avfilter/vf_colorconstancy: fix memory leak on error
Also remove unneeded log message while here.
Diffstat (limited to 'libavfilter/vf_colorconstancy.c')
-rw-r--r--libavfilter/vf_colorconstancy.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavfilter/vf_colorconstancy.c b/libavfilter/vf_colorconstancy.c
index 9917d8993e..eae62204b5 100644
--- a/libavfilter/vf_colorconstancy.c
+++ b/libavfilter/vf_colorconstancy.c
@@ -121,7 +121,6 @@ static int set_gauss(AVFilterContext *ctx)
for (; i >= 0; --i) {
av_freep(&s->gauss[i]);
}
- av_log(ctx, AV_LOG_ERROR, "Out of memory while allocating gauss buffers.\n");
return AVERROR(ENOMEM);
}
}
@@ -223,7 +222,6 @@ static int setup_derivative_buffers(AVFilterContext* ctx, ThreadData *td)
td->data[b][p] = av_mallocz_array(s->planeheight[p] * s->planewidth[p], sizeof(*td->data[b][p]));
if (!td->data[b][p]) {
cleanup_derivative_buffers(td, b + 1, p);
- av_log(ctx, AV_LOG_ERROR, "Out of memory while allocating derivatives buffers.\n");
return AVERROR(ENOMEM);
}
}
@@ -696,7 +694,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
} else {
out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
if (!out) {
- av_log(ctx, AV_LOG_ERROR, "Out of memory while allocating output video buffer.\n");
+ av_frame_free(&in);
return AVERROR(ENOMEM);
}
av_frame_copy_props(out, in);