Commit cae18e21 authored by Lennart Poettering's avatar Lennart Poettering
Browse files

socket: don't crash if the .service unit for a .socket unit is not found

parent 03631535
......@@ -8,6 +8,8 @@ Bugs:
* isolate multi-user.target doesn't start a getty@tty1 if we run it from graphical.target
* when plymouth is disabled the console password entry stuff seems to be borked
Features:
* maybe introduce ExecRestartPre=
......
......@@ -760,8 +760,9 @@ static int socket_open_fds(Socket *s) {
if ((r = socket_instantiate_service(s)) < 0)
return r;
if ((r = label_get_socket_label_from_exe(s->service->exec_command[SERVICE_EXEC_START]->path, &label)) < 0)
return r;
if (s->service && s->service->exec_command[SERVICE_EXEC_START])
if ((r = label_get_socket_label_from_exe(s->service->exec_command[SERVICE_EXEC_START]->path, &label)) < 0)
return r;
know_label = true;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment