mirror of https://git.ffmpeg.org/ffmpeg.git
bgmc: check the correct pointers
Fixes CID90539, CID90538 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
bf52ad1e49
commit
d7cabb3c7e
|
@ -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 = av_malloc(sizeof(**cf_lut) * LUT_BUFF * 16 * LUT_SIZE);
|
||||||
*cf_lut_status = av_malloc(sizeof(**cf_lut_status) * LUT_BUFF);
|
*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);
|
ff_bgmc_end(cf_lut, cf_lut_status);
|
||||||
av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n");
|
av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n");
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
|
Loading…
Reference in New Issue