From: Roy Marples Date: Mon, 7 Sep 2015 14:45:44 +0000 (+0000) Subject: If we failed to release, we may not have a state when finishing the release. X-Git-Tag: v6.9.4~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d4ecb9c1c1a323a6488ca3517d816698a5cdd0a;p=thirdparty%2Fdhcpcd.git If we failed to release, we may not have a state when finishing the release. --- diff --git a/dhcp6.c b/dhcp6.c index 992b6b00..83db4893 100644 --- 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