[vlc-commits] addons: Fix leak on error

Hugo Beauzée-Luyssen git at videolan.org
Tue May 16 17:41:18 CEST 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon May 15 13:28:20 2017 +0200| [cf7d63952f629b3dc2ad3e347a91dd99619285e7] | committer: Hugo Beauzée-Luyssen

addons: Fix leak on error

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

 modules/misc/addons/vorepository.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/misc/addons/vorepository.c b/modules/misc/addons/vorepository.c
index 4f25bc8b4e..f940f344b6 100644
--- a/modules/misc/addons/vorepository.c
+++ b/modules/misc/addons/vorepository.c
@@ -496,7 +496,10 @@ static int Open(vlc_object_t *p_this)
     if ( p_finder->psz_uri &&
          strcmp( "repo://"ADDONS_MODULE_SHORTCUT, p_finder->psz_uri ) &&
          memcmp( "repo://", p_finder->psz_uri, 8 ) )
+    {
+        free( p_finder->p_sys );
         return VLC_EGENERIC;
+    }
 
     p_finder->pf_find = Find;
     p_finder->pf_retrieve = Retrieve;



More information about the vlc-commits mailing list