rc-status: fix infinite loop when using stacked runlevels

Remove the recursive call in print_stacked_services which was causing an
infinite loop when using stacked runlevels.
I would like to thank Doug Freed and Jason Zaman for assisting with
tracking this down.

X-Gentoo-Bug: 514972
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=514972
This commit is contained in:
William Hubbs 2014-07-17 23:10:28 -05:00
parent 1a1d53335b
commit 40f42ced21

View File

@ -185,7 +185,6 @@ print_stacked_services(const char *runlevel)
servicelist = rc_services_in_runlevel(stackedlevel->value); servicelist = rc_services_in_runlevel(stackedlevel->value);
print_services(stackedlevel->value, servicelist); print_services(stackedlevel->value, servicelist);
rc_stringlist_free(servicelist); rc_stringlist_free(servicelist);
print_stacked_services(stackedlevel->value);
} }
rc_stringlist_free(stackedlevels); rc_stringlist_free(stackedlevels);
stackedlevels = NULL; stackedlevels = NULL;