CID #1247372, #1247359, #1191845 fixed 89/18889/1
sidgairo18 [Mon, 16 Jan 2017 20:35:26 +0000 (01:35 +0530)]
Change-Id: Ia62f84c020ba79c36352c5b6a98a8d66ec6d7fa2

scilab/modules/graphic_objects/src/cpp/ScilabView.cpp
scilab/modules/gui/sci_gateway/c/sci_toolbar.c
scilab/modules/sound/sci_gateway/c/sci_beep.c

index 8384099..f18aac2 100644 (file)
@@ -625,7 +625,8 @@ int ScilabView::search_path(char* _pstPath)
     {
         return 0;
     }
-
+    
+    free(pstPath);
     return path->uid;
 }
 
index 5dd2a9c..000e071 100644 (file)
@@ -218,6 +218,7 @@ int sci_toolbar(char *fname, void* pvApiCtx)
     if (createSingleString(pvApiCtx, nbInputArgument(pvApiCtx) + 1, Output))
     {
         Scierror(999, _("%s: Memory allocation error.\n"), fname);
+        FREE(Output);
         return 1;
     }
 
index ffc7add..e617d82 100644 (file)
@@ -146,6 +146,7 @@ int sci_beep(char *fname, void* pvApiCtx)
     {
         printError(&sciErr, 0);
         Scierror(999, _("%s: Memory allocation error.\n"), fname);
+        FREE(output);
         return 1;
     }