summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2016-02-17 14:25:41 -0800
committerJames Zern <jzern@google.com>2016-02-17 14:36:05 -0800
commit5d233390dbf9a43246192c43464c4507f6a58e99 (patch)
treefd9d6b9678380c132e0cd686011ff32e36d2d644
parentfdc977afc6b431c7577e70d151f89ea726bcaf8f (diff)
downloadlibvpx-5d233390dbf9a43246192c43464c4507f6a58e99.tar
libvpx-5d233390dbf9a43246192c43464c4507f6a58e99.tar.gz
libvpx-5d233390dbf9a43246192c43464c4507f6a58e99.tar.bz2
libvpx-5d233390dbf9a43246192c43464c4507f6a58e99.zip
vp10_cyclic_refresh_alloc: correct cleanup on error
previously only the CYCLIC_REFRESH allocation was being freed Change-Id: I600eb496ec4b62accf1a6483c8170eabb046787d
-rw-r--r--vp10/encoder/aq_cyclicrefresh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vp10/encoder/aq_cyclicrefresh.c b/vp10/encoder/aq_cyclicrefresh.c
index 660670cce..4d7b7d950 100644
--- a/vp10/encoder/aq_cyclicrefresh.c
+++ b/vp10/encoder/aq_cyclicrefresh.c
@@ -64,13 +64,13 @@ CYCLIC_REFRESH *vp10_cyclic_refresh_alloc(int mi_rows, int mi_cols) {
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);