From 57c0ca9d40f5cf5ec12c6f3176b97b9e25c867f0 Mon Sep 17 00:00:00 2001 From: startyourday60 Date: Sun, 27 Aug 2023 13:32:47 +0300 Subject: [PATCH] maybe a fix memory leak --- vain.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vain.cpp b/vain.cpp index ed4779e..52c9e12 100755 --- a/vain.cpp +++ b/vain.cpp @@ -405,6 +405,10 @@ int main (int argc, char * argv[]) { //keys = i2p::data::PrivateKeys::CreateRandomKeys (options.signature); //RAND_bytes( KeyBuf+MutateByte , 90 ); // FoundNonce is + + for (unsigned i = options.threads-1;i--;) + delete [] KeyBufs[i]; + delete [] KeyBufs; std::cout << "(Generate a new keypair) Attempts #" << ++attempts << std::endl; return 1; }