From 7bad255da976f65461fa27308f4c30448c42eb56 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 27 Nov 2017 11:38:01 +1100 Subject: [PATCH] Zero the data in proxies being recycled. --- src/generator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generator.c b/src/generator.c index 56853f12..a87b40c8 100644 --- a/src/generator.c +++ b/src/generator.c @@ -1077,7 +1077,6 @@ static proxy_instance_t *create_subproxy(ckpool_t *ckp, gdata_t *gdata, proxy_in /* Recycle an old proxy instance if one exists */ subproxy = gdata->dead_proxies; DL_DELETE(gdata->dead_proxies, subproxy); - subproxy->disabled = false; } else { gdata->subproxies_generated++; subproxy = ckzalloc(sizeof(proxy_instance_t)); @@ -1130,6 +1129,7 @@ static void store_proxy(gdata_t *gdata, proxy_instance_t *proxy) dealloc(proxy->baseurl); dealloc(proxy->auth); dealloc(proxy->pass); + memset(proxy, 0, sizeof(proxy_instance_t)); DL_APPEND(gdata->dead_proxies, proxy); mutex_unlock(&gdata->lock); }