From f8261b12156081d70548d208166def60836a3620 Mon Sep 17 00:00:00 2001 From: elbandi Date: Fri, 6 Jun 2014 19:39:52 +0200 Subject: [PATCH] Fix nonce1 and sessionid memory leak --- util.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util.c b/util.c index a7d24107..307f7b5e 100644 --- a/util.c +++ b/util.c @@ -1680,6 +1680,7 @@ static bool parse_extranonce(struct pool *pool, json_t *val) } cg_wlock(&pool->data_lock); + free(pool->nonce1); pool->nonce1 = nonce1; pool->n1_len = strlen(nonce1) / 2; free(pool->nonce1bin); @@ -2508,6 +2509,8 @@ resend: } cg_wlock(&pool->data_lock); + free(pool->nonce1); + free(pool->sessionid); pool->sessionid = sessionid; pool->nonce1 = nonce1; pool->n1_len = strlen(nonce1) / 2;