Output_stream src: fix CID #1368182 79/18879/7
sidgairo18 [Fri, 13 Jan 2017 15:41:57 +0000 (20:41 +0530)]
Change-Id: I4d9755ea4f099942617f1a258bd87b8a5c2c97e4

scilab/modules/output_stream/sci_gateway/cpp/sci_diary.cpp

index 3f26499..d70bcc9 100644 (file)
@@ -285,6 +285,8 @@ static int sci_diary_one_rhs(char *fname, void* pvApiCtx)
                         printError(&sciErr, 0);
                         Scierror(999, _("%s: Memory allocation error.\n"), fname);
                         freeArrayOfWideString(wcFilenames, sizewcFilenames);
+                        FREE(wfilenameUsed[0]);
+                        delete[] wfilenameUsed;
                         return 0;
                     }