Coverity #1367384, #1367385 Fixed issues 81/18881/1
sidgairo18 [Sat, 14 Jan 2017 14:05:50 +0000 (19:05 +0530)]
Change-Id: I2cd5e31e20c45c1b0596b04814ce5d5bd79f5bd7

scilab/modules/tclsci/sci_gateway/c/sci_TCL_GetVar.c
scilab/modules/tclsci/sci_gateway/c/sci_TCL_GetVersion.c

index 8a87bae..b62d389 100644 (file)
@@ -169,6 +169,7 @@ int sci_TCL_GetVar(char *fname, void* pvApiCtx)
                     printError(&sciErr, 0);
                     Scierror(999, _("%s: Memory allocation error.\n"), fname);
                     freeAllocatedSingleString(VarName);
+                    FREE(output);
                     return 1;
                 }
 
index 6912768..c3c8782 100644 (file)
@@ -62,6 +62,7 @@ int sci_TCL_GetVersion(char *fname, void* pvApiCtx)
         if (createSingleString(pvApiCtx, nbInputArgument(pvApiCtx) + 1, output))
         {
             Scierror(999, _("%s: Memory allocation error.\n"), fname);
+            FREE(output);
             return 1;
         }