diff --git a/src/codec_aom.c b/src/codec_aom.c index 175f9c524e..55f1d0e34d 100644 --- a/src/codec_aom.c +++ b/src/codec_aom.c @@ -1091,6 +1091,7 @@ static avifResult aomCodecEncodeImage(avifCodec * codec, size_t monoUVSize = (size_t)monoUVHeight * monoUVRowBytes; monoUVPlane = avifAlloc(monoUVSize); + AVIF_CHECKERR(monoUVPlane != NULL, AVIF_RESULT_OUT_OF_MEMORY); // No need for aom_img_free() because !aomImageAllocated aomImage.planes[1] = monoUVPlane; aomImage.stride[1] = monoUVRowBytes; }