From: Roy Marples Date: Tue, 2 Jun 2020 13:51:20 +0000 (+0100) Subject: ifaces could be NULL here X-Git-Tag: v9.1.1~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a8158b5a0d6e8287c2127f96c95b7799abb3e23;p=thirdparty%2Fdhcpcd.git ifaces could be NULL here --- diff --git a/src/dhcpcd.c b/src/dhcpcd.c index c9bd98cc..015b439e 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -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)