From: Roy Marples Date: Wed, 22 Jan 2020 16:21:12 +0000 (+0000) Subject: DHCP: Take interface reference on Address Defend failure X-Git-Tag: v9.0.0~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a4601a2b9a08a31198707c6236757d37eeabcc3;p=thirdparty%2Fdhcpcd.git DHCP: Take interface reference on Address Defend failure As the astate could be freed on dropping the DHCP state. --- diff --git a/src/dhcp.c b/src/dhcp.c index 54de9f72..0319301b 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -2389,9 +2389,10 @@ dhcp_message_new(struct bootp **bootp, static void dhcp_arp_defend_failed(struct arp_state *astate) { + struct interface *ifp = astate->iface; - dhcp_drop(astate->iface, "EXPIRED"); - dhcp_start1(astate->iface); + dhcp_drop(ifp, "EXPIRED"); + dhcp_start1(ifp); } #endif