scilab.cxx: Fix memory leaks
Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
This commit is contained in:
parent
030a3b08bf
commit
9b371b48d1
1 changed files with 3 additions and 0 deletions
|
|
@ -326,6 +326,7 @@ public:
|
|||
bool isLastOverloaded = isOverloaded && !Getattr(node, "sym:nextSibling");
|
||||
|
||||
if (!isOverloaded && !addSymbol(functionName, node)) {
|
||||
DelWrapper(wrapper);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -603,6 +604,7 @@ public:
|
|||
Append(getFunctionWrapper->code, "return SWIG_OK;\n");
|
||||
Append(getFunctionWrapper->code, "}\n");
|
||||
Wrapper_print(getFunctionWrapper, wrappersSection);
|
||||
DelWrapper(getFunctionWrapper);
|
||||
|
||||
/* Add function to builder table */
|
||||
addFunctionToScilab(scilabGetFunctionName, getFunctionName);
|
||||
|
|
@ -630,6 +632,7 @@ public:
|
|||
Append(setFunctionWrapper->code, "return SWIG_OK;\n");
|
||||
Append(setFunctionWrapper->code, "}\n");
|
||||
Wrapper_print(setFunctionWrapper, wrappersSection);
|
||||
DelWrapper(setFunctionWrapper);
|
||||
|
||||
/* Add function to builder table */
|
||||
addFunctionToScilab(scilabSetFunctionName, setFunctionName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue