Skip to content

Commit 0edb765

Browse files
authored
DHCP: free the state when dropping on state NONE
Fixes an issue when dhcpcd tries to release when the carrier is down. Fixes #560
1 parent 629773b commit 0edb765

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/dhcp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2921,6 +2921,7 @@ dhcp_drop(struct interface *ifp, const char *reason)
29212921
* but we do have a timeout, so punt it. */
29222922
if (state == NULL || state->state == DHS_NONE) {
29232923
eloop_timeout_delete(ifp->ctx->eloop, NULL, ifp);
2924+
dhcp_free(ifp);
29242925
dhcpcd_dropped(ifp);
29252926
return;
29262927
}

0 commit comments

Comments
 (0)