shithub: libvpx

Download patch

ref: 5d233390dbf9a43246192c43464c4507f6a58e99
parent: fdc977afc6b431c7577e70d151f89ea726bcaf8f
author: James Zern <[email protected]>
date: Wed Feb 17 09:25:41 EST 2016

vp10_cyclic_refresh_alloc: correct cleanup on error

previously only the CYCLIC_REFRESH allocation was being freed

Change-Id: I600eb496ec4b62accf1a6483c8170eabb046787d

--- a/vp10/encoder/aq_cyclicrefresh.c
+++ b/vp10/encoder/aq_cyclicrefresh.c
@@ -64,13 +64,13 @@
 
   cr->map = vpx_calloc(mi_rows * mi_cols, sizeof(*cr->map));
   if (cr->map == NULL) {
-    vpx_free(cr);
+    vp10_cyclic_refresh_free(cr);
     return NULL;
   }
   last_coded_q_map_size = mi_rows * mi_cols * sizeof(*cr->last_coded_q_map);
   cr->last_coded_q_map = vpx_malloc(last_coded_q_map_size);
   if (cr->last_coded_q_map == NULL) {
-    vpx_free(cr);
+    vp10_cyclic_refresh_free(cr);
     return NULL;
   }
   assert(MAXQ <= 255);