summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmarnath Valluri <amarnath.valluri@intel.com>2016-06-16 15:51:50 +0300
committerAmarnath Valluri <amarnath.valluri@intel.com>2016-06-16 15:51:50 +0300
commit08d5e19e6edf85e22cee4759e8ecb17228eb5b71 (patch)
treee3c72308b9d831ccf3191970d5b3c8c96a84389e
parent11b971f405cf4f1a1bb51bb3ff115ca76707c3eb (diff)
downloadswig-08d5e19e6edf85e22cee4759e8ecb17228eb5b71.tar.gz
Lua: Fix possible memory leaks
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
-rw-r--r--Source/Modules/lua.cxx3
1 files changed, 3 insertions, 0 deletions
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;
}