diff --git a/src/rc/rc-status.c b/src/rc/rc-status.c index 84c92e03..e4917c86 100644 --- a/src/rc/rc-status.c +++ b/src/rc/rc-status.c @@ -149,6 +149,8 @@ static void print_services(const char *runlevel, RC_STRINGLIST *services) l = rc_deptree_depends(deptree, types, services, r ? r : runlevel, RC_DEP_STRICT | RC_DEP_TRACE | RC_DEP_START); free(r); + if (!l) + return; TAILQ_FOREACH(s, l, entries) { TAILQ_FOREACH(t, services, entries) if (strcmp(t->value, s->value) == 0)