]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
master: Fixed crash on config reload.
authorTimo Sirainen <tss@iki.fi>
Thu, 27 May 2010 20:15:50 +0000 (21:15 +0100)
committerTimo Sirainen <tss@iki.fi>
Thu, 27 May 2010 20:15:50 +0000 (21:15 +0100)
--HG--
branch : HEAD

src/master/service-monitor.c

index 20802ed757f18361869d273e29271fd20417769a..9f4773ded549e5951fa916aaeecb926e36a03c3f 100644 (file)
@@ -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);
        }
 }