From 87aa55cadbe393505f6f6b0af8bc1ac8e64fbeab Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 15 Jan 2017 14:09:12 +1100 Subject: [PATCH] Fix memleak with remote workinfos. --- src/stratifier.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/stratifier.c b/src/stratifier.c index ed52bffc..83f59f69 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1726,7 +1726,10 @@ static bool rebuild_txns(ckpool_t *ckp, sdata_t *sdata, workbase_t *wb) } if (ret) { - LOGINFO("Rebuilt txns into workbase with %d transactions", (int)i); + LOGINFO("Rebuilt txns into workbase with %d transactions", i); + /* These two structures are regenerated so free their ram */ + json_decref(wb->merkle_array); + dealloc(wb->txn_hashes); wb_merkle_bins(ckp, sdata, wb, txn_array, false); } else { if (!sdata->wbincomplete) {