From: Roy Marples Date: Sun, 3 Nov 2019 10:13:54 +0000 (+0000) Subject: dhcpcd: Set ctx.ifaces to NULL after freeing X-Git-Tag: v8.1.2~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=538b3073c4d2adf9fbf7c53c8ad07c42b15faed0;p=thirdparty%2Fdhcpcd.git dhcpcd: Set ctx.ifaces to NULL after freeing Because they it might be used trying to find an interface to assign our option routes to when freed if never used. --- diff --git a/src/dhcpcd.c b/src/dhcpcd.c index 1509adb0..2b04bb3e 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -2133,6 +2133,7 @@ exit1: if_free(ifp); } free(ctx.ifaces); + ctx.ifaces = NULL; } free_options(&ctx, ifo); #ifdef HAVE_OPEN_MEMSTREAM