diff --git a/src/core/service.c b/src/core/service.c index 953cb2934a..ba71f97474 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -1409,10 +1409,9 @@ static int service_collect_fds( Socket *sock; int cn_fds; - if (u->type != UNIT_SOCKET) - continue; - sock = SOCKET(u); + if (!sock) + continue; cn_fds = socket_collect_fds(sock, &cfds); if (cn_fds < 0)