From: Lennart Poettering Date: Fri, 21 Jan 2011 01:49:12 +0000 (+0100) Subject: socket: don't crash if the .service unit for a .socket unit is not found X-Git-Tag: v17~7 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cae18e217208735797232eabb83a93470aefe88f;p=systemd socket: don't crash if the .service unit for a .socket unit is not found --- diff --git a/TODO b/TODO index 07b42db0..2b40b698 100644 --- a/TODO +++ b/TODO @@ -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= diff --git a/src/socket.c b/src/socket.c index 3bb8862c..4443dba0 100644 --- a/src/socket.c +++ b/src/socket.c @@ -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; }