Mercurial > hg > dhcpcd
changeset 4190:c1890895e21c draft
dhcp6: Free any existing new state
This can happen on any OS in the case of an ARP conflict which
triggers dhcpcd to potentially change profile and DHCP6 options.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Thu, 07 Dec 2017 18:33:20 +0000 |
| parents | 0b088d803b61 |
| children | 30f5f070a4aa |
| files | src/dhcp6.c |
| diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dhcp6.c Thu Dec 07 17:01:39 2017 +0000 +++ b/src/dhcp6.c Thu Dec 07 18:33:20 2017 +0000 @@ -2405,6 +2405,7 @@ return -1; retval = -1; lease = NULL; + free(state->new); state->new_len = dhcp_read_lease_fd(fd, (void **)&lease); state->new = lease; if (fd_opened) @@ -3676,8 +3677,6 @@ if (state != NULL) { switch (init_state) { case DH6S_INIT: - /* This should only happen on OS's where we keep state - * on carrier down, such as NetBSD-8. */ goto gogogo; case DH6S_INFORM: if (state->state == DH6S_INFORMED) @@ -3695,8 +3694,6 @@ } break; case DH6S_CONFIRM: - /* This should only happen on OS's where we keep state - * on carrier down, such as NetBSD-8. */ init_state = DH6S_INIT; goto gogogo; default:
