summaryrefslogtreecommitdiff
path: root/libavfilter/vf_unsharp.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2013-02-15 14:22:21 +0100
committerStefano Sabatini <stefasab@gmail.com>2013-02-17 11:48:31 +0100
commit89505f2c3f8ee1b0b68fc220a226c8bf3cef24cd (patch)
tree3c5d6a00c15da483c143bf79ae24956ef259e2b7 /libavfilter/vf_unsharp.c
parent64e592eef26b8567118a35093755fc23720b1676 (diff)
lavfi/unsharp: add missing NULL check
Diffstat (limited to 'libavfilter/vf_unsharp.c')
-rw-r--r--libavfilter/vf_unsharp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c
index 32c864c506..8c6e18a112 100644
--- a/libavfilter/vf_unsharp.c
+++ b/libavfilter/vf_unsharp.c
@@ -216,7 +216,8 @@ static int init_filter_param(AVFilterContext *ctx, FilterParam *fp, const char *
effect, effect_type, fp->msize_x, fp->msize_y, fp->amount / 65535.0);
for (z = 0; z < 2 * fp->steps_y; z++)
- fp->sc[z] = av_malloc(sizeof(*(fp->sc[z])) * (width + 2 * fp->steps_x));
+ if (!(fp->sc[z] = av_malloc(sizeof(*(fp->sc[z])) * (width + 2 * fp->steps_x))))
+ return AVERROR(ENOMEM);
return 0;
}