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

git version control git at videolan.org
Tue Nov 17 09:06:26 CET 2009


vlc | branch: 1.0-bugfix | Rémi Duraffort <ivoire at videolan.org> | Thu Nov 12 13:21:21 2009 +0100| [789c4a6ff4027e43d0c16d7a67c5dba428d527a8] | committer: Rémi Duraffort 

lua_intf: fix memleak.
(cherry picked from commit cf015393d70b394b2ca2b622e7671d2aa4e1f97d)

Signed-off-by: Rémi Duraffort <ivoire at videolan.org>

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

 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 7139264..9ee4b1b 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" );
 
@@ -253,6 +253,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