service_stop(): Also stop any pending restart timers
In service_stop() we call svc_del() which, as of Finit v3.1, free():s
the svc_t, so we don't want any lingering restart timers to wake up
after free() and start dereferencing the svc_t.
@@ -429,8 +429,9 @@ static int service_stop(svc_t *svc)
if (do_progress)
print_result(0);
return 0;
- }
+ } else
#endif
+ service_timeout_cancel(svc);
if (svc->pid <= 1) {
_d("Bad PID %d for %s, SIGTERM", svc->pid, svc->cmd);
