From 761f100ab9e22fbef7de55484664c38c3f0356b0 Mon Sep 17 00:00:00 2001 From: Noel Maersk Date: Tue, 28 Jan 2014 03:29:23 +0200 Subject: [PATCH] VS2010 build: fix a segfault from a removed realloc. --- sgminer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sgminer.c b/sgminer.c index be9bbade..0ec30255 100644 --- a/sgminer.c +++ b/sgminer.c @@ -520,6 +520,7 @@ struct pool *add_pool(void) pool->has_stratum ? pool->stratum_port : ""); pool->poolname = strdup(buf); + pools = realloc(pools, sizeof(struct pool *) * (total_pools + 2)); pools[total_pools++] = pool; mutex_init(&pool->pool_lock); if (unlikely(pthread_cond_init(&pool->cr_cond, NULL)))