]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix a null reference
authorRoy Marples <roy@marples.name>
Mon, 7 Jul 2014 18:10:18 +0000 (18:10 +0000)
committerRoy Marples <roy@marples.name>
Mon, 7 Jul 2014 18:10:18 +0000 (18:10 +0000)
if.c

diff --git a/if.c b/if.c
index bcabca0e1cee08ddc98fff58b4512df19b0aedf2..67eadcf67edbec2e0ed66c094a983d59cca74d88 100644 (file)
--- 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;