From ee58990b05afbf7a1e649eb8436a479549f030e6 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Thu, 22 Jan 2015 14:10:03 +1100 Subject: [PATCH 1/2] Generically dealloc instead of freeing share pointer in purge_share_hashtable --- src/stratifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stratifier.c b/src/stratifier.c index ca7b57ee..d7871dd1 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -523,7 +523,7 @@ static void purge_share_hashtable(sdata_t *sdata, int64_t wb_id) HASH_ITER(hh, sdata->shares, share, tmp) { if (share->workbase_id < wb_id) { HASH_DEL(sdata->shares, share); - free(share); + dealloc(share); purged++; } } From 83455ef06c4bf30389cf0a4a21ef604339b522bc Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Thu, 22 Jan 2015 16:33:12 +1100 Subject: [PATCH 2/2] Fix minor memleak in send_recv_auth --- src/stratifier.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/stratifier.c b/src/stratifier.c index d7871dd1..d5c052d4 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -2069,6 +2069,7 @@ static int send_recv_auth(stratum_instance_t *client) out_fail: ret = -1; out: + free(buf); return ret; }