]> granicus.if.org Git - libvpx/commitdiff
vp9/decoder,resize_mv_buffer: add missing alloc check
authorJames Zern <jzern@google.com>
Wed, 17 Feb 2016 20:38:40 +0000 (12:38 -0800)
committerJames Zern <jzern@google.com>
Wed, 17 Feb 2016 20:38:40 +0000 (12:38 -0800)
Change-Id: I3bc92175b07d5ef495bd75128638c340f3c2238f

vp9/decoder/vp9_decodeframe.c

index 8a492d56237a4d410358974c23ea403eb3da5fa2..9ce137d04242e08cfb2dd19507497ceacb69e326 100644 (file)
@@ -1221,8 +1221,9 @@ static void resize_mv_buffer(VP9_COMMON *cm) {
   vpx_free(cm->cur_frame->mvs);
   cm->cur_frame->mi_rows = cm->mi_rows;
   cm->cur_frame->mi_cols = cm->mi_cols;
-  cm->cur_frame->mvs = (MV_REF *)vpx_calloc(cm->mi_rows * cm->mi_cols,
-                                            sizeof(*cm->cur_frame->mvs));
+  CHECK_MEM_ERROR(cm, cm->cur_frame->mvs,
+                  (MV_REF *)vpx_calloc(cm->mi_rows * cm->mi_cols,
+                                       sizeof(*cm->cur_frame->mvs)));
 }
 
 static void resize_context_buffers(VP9_COMMON *cm, int width, int height) {