]> git.sesse.net Git - vlc/commitdiff
lua_intf: fix memleak.
authorRémi Duraffort <ivoire@videolan.org>
Thu, 12 Nov 2009 12:21:21 +0000 (13:21 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Thu, 12 Nov 2009 14:35:58 +0000 (15:35 +0100)
modules/misc/lua/intf.c

index ddcaf1565e3567042ba3eb30abec85f1cd6610a4..2207cc79977eb85c17c273cc2f9582e817a9dccf 100644 (file)
@@ -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 );