]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
If we failed to release, we may not have a state when finishing the release.
authorRoy Marples <roy@marples.name>
Mon, 7 Sep 2015 14:45:44 +0000 (14:45 +0000)
committerRoy Marples <roy@marples.name>
Mon, 7 Sep 2015 14:45:44 +0000 (14:45 +0000)
dhcp6.c

diff --git a/dhcp6.c b/dhcp6.c
index 992b6b00fe36b06cac8b665a1d83297751b14368..83db48933170488715241fabafb0634b8786354b 100644 (file)
--- a/dhcp6.c
+++ b/dhcp6.c
@@ -1620,9 +1620,10 @@ dhcp6_finishrelease(void *arg)
        struct dhcp6_state *state;
 
        ifp = (struct interface *)arg;
-       state = D6_STATE(ifp);
-       state->state = DH6S_RELEASED;
-       dhcp6_drop(ifp, "RELEASE6");
+       if ((state = D6_STATE(ifp)) != NULL) {
+               state->state = DH6S_RELEASED;
+               dhcp6_drop(ifp, "RELEASE6");
+       }
 }
 
 static void