CID #1098686, #1098693 Fixed 10/18910/3
Siddhartha Gairola [Wed, 18 Jan 2017 17:23:53 +0000 (22:23 +0530)]
Change-Id: I10ecd8262e4097eac64743d57ba0ead4c81b256e

scilab/modules/gui/sci_gateway/c/sci_mpopup.c
scilab/modules/gui/sci_gateway/cpp/sci_uigetfont.cpp

index d3da824..103e6a0 100644 (file)
@@ -99,6 +99,7 @@ int sci_mpopup(char *fname, void* pvApiCtx)
     pstRes = uiWaitContextMenu(iUicontextmenuUID);
 
     iRet = createSingleString(pvApiCtx, nbInputArgument(pvApiCtx) + 1, pstRes);
+    FREE(pstRes);
     if (iRet)
     {
         freeAllocatedMatrixOfString(iRows, iCols, pstAllMenuLabels);
index 46cfed9..3aa49ce 100644 (file)
@@ -248,6 +248,7 @@ int sci_uigetfont(char *fname, void* pvApiCtx)
             {
                 printError(&sciErr, 0);
                 Scierror(999, _("%s: Memory allocation error.\n"), fname);
+                delete[] selectedFontName;
                 return 1;
             }
         }