]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
dhcpcd: Set ctx.ifaces to NULL after freeing
authorRoy Marples <roy@marples.name>
Sun, 3 Nov 2019 10:13:54 +0000 (10:13 +0000)
committerRoy Marples <roy@marples.name>
Sun, 3 Nov 2019 10:13:54 +0000 (10:13 +0000)
Because they it might be used trying to find an interface to assign
our option routes to when freed if never used.

src/dhcpcd.c

index 1509adb07ea34621d9b4666979da620e24fba3e7..2b04bb3e65f23422fc0d2709a01885499116dc91 100644 (file)
@@ -2133,6 +2133,7 @@ exit1:
                        if_free(ifp);
                }
                free(ctx.ifaces);
+               ctx.ifaces = NULL;
        }
        free_options(&ctx, ifo);
 #ifdef HAVE_OPEN_MEMSTREAM