diff --git a/walletconsole/lib/Util.cpp b/walletconsole/lib/Util.cpp index 5a54509998e..01bcba85e9f 100644 --- a/walletconsole/lib/Util.cpp +++ b/walletconsole/lib/Util.cpp @@ -79,6 +79,7 @@ bool Util::fileR(const string& fileName, string& res) { char* buffer = new char[length]; if (!infile.read(buffer, length)) { _out << "Could not read file '" << fileName << "'" << endl; + delete[] buffer; return false; } int red = infile.gcount();