summaryrefslogtreecommitdiff
path: root/src/rc/runscript.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-05-12 13:20:35 +0000
committerRoy Marples <roy@marples.name>2008-05-12 13:20:35 +0000
commitd667da8e5c4b3de1f73dd288f88ea8783799735b (patch)
treedf2b9da9c13a4aff9664c513f26f9ecdaf904a7e /src/rc/runscript.c
parent98946697423c10d5ec0f68cd4f69ec44264b3cde (diff)
downloadopenrc-d667da8e5c4b3de1f73dd288f88ea8783799735b.tar.gz
openrc-d667da8e5c4b3de1f73dd288f88ea8783799735b.tar.bz2
openrc-d667da8e5c4b3de1f73dd288f88ea8783799735b.tar.xz
Check we have a deptree before using it, Gentoo #220579
Diffstat (limited to 'src/rc/runscript.c')
-rw-r--r--src/rc/runscript.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/rc/runscript.c b/src/rc/runscript.c
index 7b87c27..e234b76 100644
--- a/src/rc/runscript.c
+++ b/src/rc/runscript.c
@@ -877,11 +877,13 @@ static void svc_start(bool deps)
}
/* Do the same for any services we provide */
- tmplist = rc_deptree_depend(deptree, "iprovide", applet);
- if (tmplist) {
- TAILQ_FOREACH(svc, tmplist, entries) {
- services = rc_services_scheduled(svc->value);
- if (services) {
+ if (deptree) {
+ tmplist = rc_deptree_depend(deptree, "iprovide", applet);
+ if (tmplist) {
+ TAILQ_FOREACH(svc, tmplist, entries) {
+ services = rc_services_scheduled(svc->value);
+ if (! services)
+ continue;
TAILQ_FOREACH(svc2, services, entries)
if (rc_service_state(svc2->value) & RC_SERVICE_STOPPED)
service_start(svc2->value);