if (u->meta.load_state == UNIT_LOADED) {
if (have_non_accept_socket(s)) {
- if ((r = unit_load_related_unit(u, ".service", (Unit**) &s->service)))
+ if ((r = unit_load_related_unit(u, ".service", (Unit**) &s->service)) < 0)
return r;
if ((r = unit_add_dependency(u, UNIT_BEFORE, UNIT(s->service), true)) < 0)
socket_set_state(s, SOCKET_RUNNING);
} else {
Unit *u;
- char *prefix, *instance, *name;
+ char *prefix, *instance = NULL, *name;
if (s->n_connections >= s->max_connections) {
log_warning("Too many incoming connections (%u)", s->n_connections);