From: Roy Marples Date: Mon, 23 Mar 2026 15:31:01 +0000 (+0000) Subject: DHCP: free the state when dropping on state NONE X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;p=thirdparty%2Fdhcpcd.git DHCP: free the state when dropping on state NONE Fixes an issue when dhcpcd tries to release when the carrier is down. Fixes #560 --- diff --git a/src/dhcp.c b/src/dhcp.c index 6122acbc..4c1b35ea 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -2921,6 +2921,7 @@ dhcp_drop(struct interface *ifp, const char *reason) * but we do have a timeout, so punt it. */ if (state == NULL || state->state == DHS_NONE) { eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp); + dhcp_free(ifp); dhcpcd_dropped(ifp); return; }