]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
ifaces could be NULL here
authorRoy Marples <roy@marples.name>
Tue, 2 Jun 2020 13:51:20 +0000 (14:51 +0100)
committerRoy Marples <roy@marples.name>
Tue, 2 Jun 2020 13:51:20 +0000 (14:51 +0100)
src/dhcpcd.c

index c9bd98cc38c582a4d55e65e9c97aa86daa471461..015b439e2516cd54f61fe71f0e963da8b7a98278 100644 (file)
@@ -1341,6 +1341,9 @@ stop_all_interfaces(struct dhcpcd_ctx *ctx, unsigned long long opts)
        struct interface *ifp;
 
        ctx->options |= DHCPCD_EXITING;
+       if (ctx->ifaces == NULL)
+               return;
+
        /* Drop the last interface first */
        TAILQ_FOREACH_REVERSE(ifp, ctx->ifaces, if_head, next) {
                if (!ifp->active)