chiark / gitweb /
don't choke if there are no sockets for a service
authorLennart Poettering <lennart@poettering.net>
Wed, 27 Jan 2010 03:55:42 +0000 (04:55 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 27 Jan 2010 03:55:42 +0000 (04:55 +0100)
service.c

index fce4204..cef9417 100644 (file)
--- a/service.c
+++ b/service.c
@@ -285,6 +285,9 @@ static int service_collect_fds(Service *s, int **fds, unsigned *n_fds) {
                 p = manager_get_unit(UNIT(s)->meta.manager, k);
                 free(k);
 
+                if (!p)
+                        continue;
+
                 if ((r = socket_collect_fds(SOCKET(p), &cfds, &cn_fds)) < 0)
                         goto fail;