From 08d5e19e6edf85e22cee4759e8ecb17228eb5b71 Mon Sep 17 00:00:00 2001 From: Amarnath Valluri Date: Thu, 16 Jun 2016 15:51:50 +0300 Subject: [PATCH] Lua: Fix possible memory leaks Signed-off-by: Amarnath Valluri --- Source/Modules/lua.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Modules/lua.cxx b/Source/Modules/lua.cxx index 1b4c8f617..80ea47f3f 100644 --- a/Source/Modules/lua.cxx +++ b/Source/Modules/lua.cxx @@ -856,6 +856,9 @@ public: //Printf(stdout,"Swig_overload_dispatch %s %s '%s' %d\n",symname,wname,dispatch,maxargs); if (!luaAddSymbol(lua_name, n)) { + DelWrapper(f); + Delete(dispatch); + Delete(tmp); return SWIG_ERROR; }