]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Destroy lease file if releasing.
authorRoy Marples <roy@marples.name>
Thu, 4 Apr 2013 23:29:54 +0000 (23:29 +0000)
committerRoy Marples <roy@marples.name>
Thu, 4 Apr 2013 23:29:54 +0000 (23:29 +0000)
dhcp.c

diff --git a/dhcp.c b/dhcp.c
index 480c24f9cd5c3b4188beb2a1ec0c413f95db3e5b..1fb36a6008f65bd6f0aa462acb77829122f394ce 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -2019,6 +2019,8 @@ dhcp_drop(struct interface *iface, const char *reason)
        if (state == NULL)
                return;
        eloop_timeouts_delete(iface, dhcp_expire, NULL);
+       if (iface->options->options & DHCPCD_RELEASE)
+               unlink(state->leasefile);
        free(state->old);
        state->old = state->new;
        state->new = NULL;