Merge branch 'avalluri-leaks'
* avalluri-leaks: whitespace fix memory leak improvements - delete at end of scope CCache: Fix typo in null check CCache: Fix memory/file descriptor leaks scilab.cxx: Fix memory leaks Fix leaked file descriptor Lua: Fix possible memory leaks go.cxx: Fix use of a freed variable Closes #710 Closes #712 Closes #713 Closes #715 Closes #716
This commit is contained in:
commit
2da7e066b3
9 changed files with 36 additions and 6 deletions
|
|
@ -4176,7 +4176,6 @@ private:
|
|||
|
||||
Wrapper *dummy = NewWrapper();
|
||||
emit_attach_parmmaps(parms, dummy);
|
||||
DelWrapper(dummy);
|
||||
|
||||
Swig_typemap_attach_parms("gotype", parms, NULL);
|
||||
Swig_typemap_attach_parms("imtype", parms, NULL);
|
||||
|
|
@ -4233,6 +4232,8 @@ private:
|
|||
Swig_typemap_attach_parms("goin", parms, dummy);
|
||||
Swig_typemap_attach_parms("goargout", parms, dummy);
|
||||
|
||||
DelWrapper(dummy);
|
||||
|
||||
if (!is_ignored) {
|
||||
// We use an interface to see if this method is defined in Go.
|
||||
Printv(f_go_wrappers, "type ", interface_name, " interface {\n", NULL);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -326,6 +326,7 @@ public:
|
|||
bool isLastOverloaded = isOverloaded && !Getattr(node, "sym:nextSibling");
|
||||
|
||||
if (!isOverloaded && !addSymbol(functionName, node)) {
|
||||
DelWrapper(wrapper);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -633,7 +634,10 @@ public:
|
|||
|
||||
/* Add function to builder table */
|
||||
addFunctionToScilab(scilabSetFunctionName, setFunctionName);
|
||||
|
||||
DelWrapper(setFunctionWrapper);
|
||||
}
|
||||
DelWrapper(getFunctionWrapper);
|
||||
|
||||
return SWIG_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue