[FFmpeg-cvslog] bgmc: Fix av_malloc checks in ff_bgmc_init()

Xi Wang git at videolan.org
Thu Nov 15 11:40:50 CET 2012


ffmpeg | branch: master | Xi Wang <xi.wang at gmail.com> | Wed Nov 14 13:45:24 2012 -0500| [b74dbdd5e99aed7f3bf1ecb5da1b374e5ba35768] | committer: Diego Biurrun

bgmc: Fix av_malloc checks in ff_bgmc_init()

Signed-off-by: Xi Wang <xi.wang at gmail.com>
Signed-off-by: Diego Biurrun <diego at biurrun.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b74dbdd5e99aed7f3bf1ecb5da1b374e5ba35768
---

 libavcodec/bgmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/bgmc.c b/libavcodec/bgmc.c
index 08b1337..ec8cf9b 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);



More information about the ffmpeg-cvslog mailing list