From: Timo Sirainen Date: Thu, 27 May 2010 20:15:50 +0000 (+0100) Subject: master: Fixed crash on config reload. X-Git-Tag: 2.0.beta6~127 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=57dc3cb5d5e315272353abf55f702eefc084db26;p=thirdparty%2Fdovecot%2Fcore.git master: Fixed crash on config reload. --HG-- branch : HEAD --- diff --git a/src/master/service-monitor.c b/src/master/service-monitor.c index 20802ed757..9f4773ded5 100644 --- a/src/master/service-monitor.c +++ b/src/master/service-monitor.c @@ -427,6 +427,11 @@ void services_monitor_reap_children(void) } if (service->type == SERVICE_TYPE_ANVIL) service_anvil_process_destroyed(process); + + /* if we're reloading, we may get here with a service list + that's going to be destroyed after this process is + destroyed. keep the list referenced until we're done. */ + service_list_ref(service->list); service_process_destroy(process); if (throttle) @@ -437,5 +442,6 @@ void services_monitor_reap_children(void) if (service->to_throttle == NULL) service_monitor_listen_start(service); } + service_list_unref(service->list); } }