]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP: free the state when dropping on state NONE master
authorRoy Marples <roy@marples.name>
Mon, 23 Mar 2026 15:31:01 +0000 (15:31 +0000)
committerGitHub <noreply@github.com>
Mon, 23 Mar 2026 15:31:01 +0000 (15:31 +0000)
Fixes an issue when dhcpcd tries to release when the carrier
is down.

Fixes #560

src/dhcp.c

index 6122acbc9a6ab991d33841882198c2c48ef07a01..4c1b35ea004505054ba4330f931d07b30dd2f25b 100644 (file)
@@ -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;
        }