[vlc-devel] commit: lua_intf: fix memleak. ( Rémi Duraffort )

git version control git at videolan.org
Thu Nov 12 15:46:41 CET 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Nov 12 13:21:21 2009 +0100| [cf015393d70b394b2ca2b622e7671d2aa4e1f97d] | committer: Rémi Duraffort 

lua_intf: fix memleak.

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

 modules/misc/lua/intf.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules/misc/lua/intf.c b/modules/misc/lua/intf.c
index ddcaf15..2207cc7 100644
--- a/modules/misc/lua/intf.c
+++ b/modules/misc/lua/intf.c
@@ -151,7 +151,7 @@ int Open_LuaIntf( vlc_object_t *p_this )
 
     config_ChainParse( p_intf, "lua-", ppsz_intf_options, p_intf->p_cfg );
     char *psz_name = GetModuleName( p_intf );
-    const char *psz_config;
+    char *psz_config;
     bool b_config_set = false;
     if( !psz_name ) psz_name = strdup( "dummy" );
 
@@ -261,6 +261,8 @@ int Open_LuaIntf( vlc_object_t *p_this )
             }
         }
     }
+    free( psz_config );
+
     if( b_config_set == false )
     {
         lua_newtable( L );




More information about the vlc-devel mailing list