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

git version control git at videolan.org
Sun Jun 21 14:18:59 CEST 2009


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

Fix potential memleak.
(cherry picked from commit c5af2987b60ec1ce69972f82cf76f481d499fe5c)

Signed-off-by: Rémi Duraffort <ivoire at videolan.org>

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

 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 729a9ea..bbeaccf 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -2018,7 +2018,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