From: Roy Marples Date: Mon, 7 Jul 2014 18:10:18 +0000 (+0000) Subject: Fix a null reference X-Git-Tag: v6.4.1~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=261d053a8fddaebe194cdc15ccf72a97f8e258f7;p=thirdparty%2Fdhcpcd.git Fix a null reference --- diff --git a/if.c b/if.c index bcabca0e..67eadcf6 100644 --- a/if.c +++ b/if.c @@ -484,7 +484,7 @@ if_find(struct dhcpcd_ctx *ctx, const char *ifname) if (ctx != NULL && ctx->ifaces != NULL) { TAILQ_FOREACH(ifp, ctx->ifaces, next) { - if ((ifp->options || + if ((ifp->options == NULL || !(ifp->options->options & DHCPCD_PFXDLGONLY)) && strcmp(ifp->name, ifname) == 0) return ifp;