Browse Source

VS2010 build: fix a segfault from a removed realloc.

nfactor-troky
Noel Maersk 11 years ago
parent
commit
761f100ab9
  1. 1
      sgminer.c

1
sgminer.c

@ -520,6 +520,7 @@ struct pool *add_pool(void)
pool->has_stratum ? pool->stratum_port : ""); pool->has_stratum ? pool->stratum_port : "");
pool->poolname = strdup(buf); pool->poolname = strdup(buf);
pools = realloc(pools, sizeof(struct pool *) * (total_pools + 2));
pools[total_pools++] = pool; pools[total_pools++] = pool;
mutex_init(&pool->pool_lock); mutex_init(&pool->pool_lock);
if (unlikely(pthread_cond_init(&pool->cr_cond, NULL))) if (unlikely(pthread_cond_init(&pool->cr_cond, NULL)))

Loading…
Cancel
Save