Commit 825e270d authored by hkuang's avatar hkuang Committed by Gerrit Code Review
Browse files

Merge "Fix the memory leak due to missing free frame_mvs."

parents 0593ce39 23da920a
......@@ -87,14 +87,14 @@ void vp9_free_ref_frame_buffers(VP9_COMMON *cm) {
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment