socket: don't crash if the .service unit for a .socket unit is not found
This commit is contained in:
+3
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user