From e238855fa744ed00e431fa996f30bab85d19fc87 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 16 Mar 2026 20:04:48 +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 cd9178ad..53f5435c 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; }