[vlc-devel] commit: Resource leak in media_discoverer. (Derk-Jan Hartman )

git version control git at videolan.org
Thu Oct 2 21:13:28 CEST 2008


vlc | branch: 0.9-bugfix | Derk-Jan Hartman <hartman at videolan.org> | Thu Oct  2 20:48:25 2008 +0200| [59a92545b432674c8dc8c58b798a2958f4fa41de] | committer: Derk-Jan Hartman 

Resource leak in media_discoverer.

backport of [4e9d2f92cdaa51783fa29fb7518d81b7d1b21980] and [d12f65f6209a8f3a71ab921b9bd77b4c65851f0d]

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

 src/control/media_discoverer.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/control/media_discoverer.c b/src/control/media_discoverer.c
index 5f33b14..e9124f1 100644
--- a/src/control/media_discoverer.c
+++ b/src/control/media_discoverer.c
@@ -178,8 +178,9 @@ libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
 
     if( !p_mdis->p_sd )
     {
-        free( p_mdis );
         libvlc_exception_raise( p_e, "Can't find the services_discovery module named '%s'", psz_name );
+        libvlc_media_list_release( p_mdis->p_mlist );
+        free( p_mdis );
         return NULL;
     }
 




More information about the vlc-devel mailing list