1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-22 20:44:19 +00:00

Bugfix: Free old stratum_work data before replacing it

This commit is contained in:
Luke Dashjr 2012-10-29 07:50:47 +00:00 committed by Con Kolivas
parent c2861d683a
commit c2b5c5ee4c

7
util.c
View File

@ -1084,6 +1084,13 @@ static bool parse_notify(struct pool *pool, json_t *val)
}
mutex_lock(&pool->pool_lock);
free(pool->swork.job_id);
free(pool->swork.prev_hash);
free(pool->swork.coinbase1);
free(pool->swork.coinbase2);
free(pool->swork.bbversion);
free(pool->swork.nbit);
free(pool->swork.ntime);
pool->swork.job_id = job_id;
pool->swork.prev_hash = prev_hash;
pool->swork.coinbase1 = coinbase1;