ref: 825e270d0127aeb9f2bc1b2cb161ed1d263a6997
parent: 0593ce390d5f5a062cb21105087bd291ae7ccb4b
parent: 23da920a8eb0febb46f5d40acea6f049dde7b40c
author: hkuang <[email protected]>
date: Tue Nov 4 09:43:47 EST 2014
Merge "Fix the memory leak due to missing free frame_mvs."
--- 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);