[vlc-devel] commit: Fix memleak in opencv. ( Rémi Duraffort )

git version control git at videolan.org
Fri Aug 1 16:18:05 CEST 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Aug  1 16:09:48 2008 +0200| [80aa55bbf7dcd15af07aadb374f9e867f74fdf5e] | committer: Rémi Duraffort 

Fix memleak in opencv.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=80aa55bbf7dcd15af07aadb374f9e867f74fdf5e
---

 modules/video_filter/opencv_example.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/modules/video_filter/opencv_example.cpp b/modules/video_filter/opencv_example.cpp
index d4ba06c..76b8665 100644
--- a/modules/video_filter/opencv_example.cpp
+++ b/modules/video_filter/opencv_example.cpp
@@ -113,6 +113,7 @@ static int OpenFilter( vlc_object_t *p_this )
     char* filename = config_GetPsz( p_filter, "opencv-haarcascade-file" );
     p_filter->p_sys->p_cascade = (CvHaarClassifierCascade*)cvLoad( filename, 0, 0, 0 );
     p_filter->p_sys->p_storage = cvCreateMemStorage(0);
+    free( filename );
 
     return VLC_SUCCESS;
 }




More information about the vlc-devel mailing list