ref: 23da920a8eb0febb46f5d40acea6f049dde7b40c
parent: 1e753387c837fa1be82b5fcc9b2879e5e8decd09
author: hkuang <[email protected]>
date: Mon Nov 3 07:25:18 EST 2014
Fix the memory leak due to missing free frame_mvs. Change-Id: I2ceee7341d906259002c0ea31ea009ae32c04bfd
--- a/vp9/common/vp9_alloccommon.c
+++ b/vp9/common/vp9_alloccommon.c
@@ -87,14 +87,14 @@
int i;
for (i = 0; i < FRAME_BUFFERS; ++i) {
- vp9_free_frame_buffer(&cm->frame_bufs[i].buf);
-
if (cm->frame_bufs[i].ref_count > 0 &&
cm->frame_bufs[i].raw_frame_buffer.data != NULL) {
cm->release_fb_cb(cm->cb_priv, &cm->frame_bufs[i].raw_frame_buffer);
- vpx_free(cm->frame_bufs[i].mvs);
cm->frame_bufs[i].ref_count = 0;
}
+ vpx_free(cm->frame_bufs[i].mvs);
+ cm->frame_bufs[i].mvs = NULL;
+ vp9_free_frame_buffer(&cm->frame_bufs[i].buf);
}
vp9_free_frame_buffer(&cm->post_proc_buffer);