From c2e092f29eb624ee9f84381a01472889b54f22e0 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 29 Jun 2016 11:45:47 +1200 Subject: [PATCH] Fix memory leak in large tx benchmark --- src/zcbenchmarks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zcbenchmarks.cpp b/src/zcbenchmarks.cpp index e92d51400..5e1fe4739 100644 --- a/src/zcbenchmarks.cpp +++ b/src/zcbenchmarks.cpp @@ -231,6 +231,7 @@ processblock: } double ret = timer_stop(); + delete pblocktemplate; if (!testValidate) return ret; @@ -238,7 +239,6 @@ processblock: mempool.addUnchecked(hash, CTxMemPoolEntry(mtx2, 11, GetTime(), 111.0, 11)); // 4) Call CreateNewBlock (which itself calls TestBlockValidity) - delete pblocktemplate; pblocktemplate = CreateNewBlock(scriptDummy); pblock = &pblocktemplate->block;