mirror of
https://github.com/troglobit/finit.git
synced 2026-10-02 14:02:52 +07:00
Fix NULL ptr dereference causing kernel panic
When `service_stop_done()` is called with a `NULL` argument and no dynamic services have been stopped, this regression is triggered. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -406,7 +406,7 @@ static int service_stop_done(svc_t *svc)
|
||||
plugin_run_hooks(HOOK_SVC_RECONF); /* Reconfigure HW/VLANs/etc here */
|
||||
|
||||
/* Finish off by starting/reload modified/new services */
|
||||
if (svc->state == SVC_RELOAD_STATE)
|
||||
if (svc && svc->state == SVC_RELOAD_STATE)
|
||||
service_start_dynamic();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user