X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fexcompiler.cpp;h=0febfbd34046c1722f1a872d78b25ff028b90077;hp=375776d8e1428595f1ce4a8d42c9ac9f8f8d6e7e;hb=cca88b51436e4b654d16a4d60cd0d1c66fcf5dd6;hpb=c28e61da33905ddc69abf893aaffec98aa30d053 diff --git a/ginac/excompiler.cpp b/ginac/excompiler.cpp index 375776d8..0febfbd3 100644 --- a/ginac/excompiler.cpp +++ b/ginac/excompiler.cpp @@ -6,7 +6,7 @@ */ /* - * GiNaC Copyright (C) 1999-2010 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2014 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -113,12 +113,12 @@ public: char* new_filename = new char[strlen(filename_pattern)+1]; strcpy(new_filename, filename_pattern); if (!mktemp(new_filename)) { - delete new_filename; + delete[] new_filename; throw std::runtime_error("mktemp failed"); } filename = std::string(new_filename); ofs.open(new_filename, std::ios::out); - delete new_filename; + delete[] new_filename; } else { // use parameter as filename ofs.open(filename.c_str(), std::ios::out); @@ -172,7 +172,7 @@ public: for (std::vector::iterator it = filelist.begin(); it != filelist.end();) { if (it->name == filename) { clean_up(it); - filelist.erase(it); + it = filelist.erase(it); } else { ++it; }