[x264-devel] commit: Add missing free()s for new data allocated for MB-tree ( Jason Garrett-Glaser )

git version control git at videolan.org
Sun Aug 9 02:51:47 CEST 2009


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Sat Aug  8 17:51:01 2009 -0700| [3b047a2a7d55d613c6ae49da22c7f30d02a048dc] | committer: Jason Garrett-Glaser 

Add missing free()s for new data allocated for MB-tree
Eliminates a memory leak.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=3b047a2a7d55d613c6ae49da22c7f30d02a048dc
---

 common/frame.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/common/frame.c b/common/frame.c
index 7da7983..d028ce5 100644
--- a/common/frame.c
+++ b/common/frame.c
@@ -174,6 +174,13 @@ void x264_frame_delete( x264_frame_t *frame )
             x264_free( frame->lowres_mvs[j][i] );
             x264_free( frame->lowres_mv_costs[j][i] );
         }
+    x264_free( frame->i_propagate_cost );
+    for( j = 0; j <= X264_BFRAME_MAX+1; j++ )
+        for( i = 0; i <= X264_BFRAME_MAX+1; i++ )
+        {
+            x264_free( frame->lowres_costs[j][i] );
+            x264_free( frame->lowres_inter_types[j][i] );
+        }
     x264_free( frame->f_qp_offset );
     x264_free( frame->i_inv_qscale_factor );
     x264_free( frame->i_intra_cost );



More information about the x264-devel mailing list