From d15d19bf3a62064f3133048fe17254383e953c19 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Thu, 7 Aug 2014 10:51:17 +1000 Subject: [PATCH] si should only be dealloced on shutdown --- src/generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generator.c b/src/generator.c index 7a96e095..e2d3d2a4 100644 --- a/src/generator.c +++ b/src/generator.c @@ -192,7 +192,6 @@ static void kill_server(server_instance_t *si) dealloc(cs->port); dealloc(cs->auth); dealloc(si->data); - dealloc(si); } static int gen_loop(proc_instance_t *pi) @@ -1315,6 +1314,7 @@ static int server_mode(ckpool_t *ckp, proc_instance_t *pi) for (i = 0; i < ckp->btcds; i++) { si = ckp->servers[i]; kill_server(si); + dealloc(si); } dealloc(ckp->servers); return ret;