vp10_cyclic_refresh_alloc: correct cleanup on error
previously only the CYCLIC_REFRESH allocation was being freed Change-Id: I600eb496ec4b62accf1a6483c8170eabb046787d
This commit is contained in:
parent
fdc977afc6
commit
5d233390db
@ -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));
|
cr->map = vpx_calloc(mi_rows * mi_cols, sizeof(*cr->map));
|
||||||
if (cr->map == NULL) {
|
if (cr->map == NULL) {
|
||||||
vpx_free(cr);
|
vp10_cyclic_refresh_free(cr);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
last_coded_q_map_size = mi_rows * mi_cols * sizeof(*cr->last_coded_q_map);
|
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);
|
cr->last_coded_q_map = vpx_malloc(last_coded_q_map_size);
|
||||||
if (cr->last_coded_q_map == NULL) {
|
if (cr->last_coded_q_map == NULL) {
|
||||||
vpx_free(cr);
|
vp10_cyclic_refresh_free(cr);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
assert(MAXQ <= 255);
|
assert(MAXQ <= 255);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user