]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Move free to exit function.
authorRoy Marples <roy@marples.name>
Tue, 13 Nov 2012 17:30:19 +0000 (17:30 +0000)
committerRoy Marples <roy@marples.name>
Tue, 13 Nov 2012 17:30:19 +0000 (17:30 +0000)
dhcp6.c

diff --git a/dhcp6.c b/dhcp6.c
index 9f22de0a7b8dc3f800fb3fe33d8bf9e0344f7b4e..12d0312cfcc3865fb80176ae3f57340ed4ed9fef 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
@@ -1097,13 +1097,13 @@ dhcp6_readlease(struct interface *ifp)
        gettimeofday(&now, NULL);
        if ((time_t)state->expire < now.tv_sec - st.st_mtime) {
                syslog(LOG_DEBUG, "%s: discarding expired lease", ifp->name);
-               dhcp6_freedrop_addrs(ifp, 0);
                goto ex;
        }
 
        return bytes;
 
 ex:
+       dhcp6_freedrop_addrs(ifp, 0);
        free(state->new);
        state->new = NULL;
        state->new_len = 0;