summaryrefslogtreecommitdiff
path: root/libavcodec/bgmc.c
diff options
context:
space:
mode:
authorXi Wang <xi.wang@gmail.com>2012-11-14 13:45:24 -0500
committerDiego Biurrun <diego@biurrun.de>2012-11-14 23:03:36 +0100
commitb74dbdd5e99aed7f3bf1ecb5da1b374e5ba35768 (patch)
tree173d3de911e2926e66462e03796592809e8b1cc4 /libavcodec/bgmc.c
parent8034130e06b03859af9ce64f7ee653cd14df328d (diff)
downloadffmpeg-b74dbdd5e99aed7f3bf1ecb5da1b374e5ba35768.tar.gz
bgmc: Fix av_malloc checks in ff_bgmc_init()
Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavcodec/bgmc.c')
-rw-r--r--libavcodec/bgmc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/bgmc.c b/libavcodec/bgmc.c
index 08b13373f3..ec8cf9bc0a 100644
--- a/libavcodec/bgmc.c
+++ b/libavcodec/bgmc.c
@@ -461,7 +461,7 @@ int ff_bgmc_init(AVCodecContext *avctx, uint8_t **cf_lut, int **cf_lut_status)
*cf_lut = av_malloc(sizeof(*cf_lut) * LUT_BUFF * 16 * LUT_SIZE);
*cf_lut_status = av_malloc(sizeof(*cf_lut_status) * LUT_BUFF);
- if (!cf_lut || !cf_lut_status) {
+ if (!*cf_lut || !*cf_lut_status) {
ff_bgmc_end(cf_lut, cf_lut_status);
av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n");
return AVERROR(ENOMEM);