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

git version control git at videolan.org
Sun Jun 21 12:28:36 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Jun 21 12:15:42 2009 +0200| [c5af2987b60ec1ce69972f82cf76f481d499fe5c] | committer: Rémi Duraffort 

Fix potential memleak.

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

 modules/access/dshow/dshow.cpp |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp
index 7d53358..3fbd317 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -2012,7 +2012,11 @@ static int ConfigDevicesCallback( vlc_object_t *p_this, char const *psz_name,
 
     p_item = config_FindConfig( p_this, psz_name );
 
-    if( !p_item ) return VLC_SUCCESS;
+    if( !p_item )
+    {
+        free( psz_device );
+        return VLC_SUCCESS;
+    }
 
     if( !strcmp( psz_name, "dshow-adev" ) ) b_audio = true;
 




More information about the vlc-devel mailing list