From a5cb5339249c0e8d31568e0dee06e06411ce76d5 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 19 Jul 2016 11:23:08 +1000 Subject: [PATCH] Fix crash with proxy that has no subproxies --- src/generator.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/generator.c b/src/generator.c index 5d21ed03..33100bc6 100644 --- a/src/generator.c +++ b/src/generator.c @@ -2446,9 +2446,11 @@ static void delete_proxy(ckpool_t *ckp, gdata_t *gdata, proxy_instance_t *proxy) HASH_DELETE(sh, proxy->subproxies, subproxy); mutex_unlock(&proxy->proxy_lock); - send_stratifier_deadproxy(ckp, subproxy->id, subproxy->subid); - if (subproxy && proxy != subproxy) - store_proxy(gdata, subproxy); + if (subproxy) { + send_stratifier_deadproxy(ckp, subproxy->id, subproxy->subid); + if (proxy != subproxy) + store_proxy(gdata, subproxy); + } } while (subproxy); /* Recycle the proxy itself */