From 0edb7659597442c65e6d867c4a3e75b234358afe Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 23 Mar 2026 15:31:01 +0000 Subject: [PATCH] DHCP: free the state when dropping on state NONE Fixes an issue when dhcpcd tries to release when the carrier is down. Fixes #560 --- src/dhcp.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.47.3