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

git version control git at videolan.org
Mon Oct 6 20:31:15 CEST 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Oct  6 20:28:22 2008 +0200| [250591e12a5370eaa936ca6c2e012f7fd2fcf5b1] | committer: Rémi Duraffort 

Fix potential memleak (CID 227)

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

 modules/control/http/macro.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/modules/control/http/macro.c b/modules/control/http/macro.c
index 2b6aff0..435232b 100644
--- a/modules/control/http/macro.c
+++ b/modules/control/http/macro.c
@@ -555,7 +555,11 @@ static void MacroDo( httpd_file_sys_t *p_args,
                     if( p_intf->p_sys->p_vlm == NULL )
                         p_intf->p_sys->p_vlm = vlm_New( p_intf );
 
-                    if( p_intf->p_sys->p_vlm == NULL ) break;
+                    if( p_intf->p_sys->p_vlm == NULL )
+                    {
+                        free( psz );
+                        break;
+                    }
 
                     ExtractURIValue( p_request, "name", name, 512 );
                     if( StrToMacroType( control ) == MVLC_VLM_NEW )




More information about the vlc-devel mailing list