changeset 1899:715ffed82bb6 draft

Fix RELEASE support.
author Roy Marples <roy@marples.name>
date Thu, 04 Apr 2013 21:58:51 +0000
parents c66c14b42827
children c6cc0f957f86
files dhcp.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dhcp.c	Thu Apr 04 20:31:05 2013 +0000
+++ b/dhcp.c	Thu Apr 04 21:58:51 2013 +0000
@@ -1665,9 +1665,13 @@
 void
 dhcp_release(struct interface *ifp)
 {
-	struct dhcp_state *state = D_STATE(ifp);
+	struct dhcp_state *state;
 	struct timespec ts;
 
+	state = D_STATE(ifp);
+	if (state == NULL)
+		return;
+
 	if (state->new != NULL && state->new->cookie == htonl(MAGIC_COOKIE)) {
 		syslog(LOG_INFO, "%s: releasing lease of %s",
 		    ifp->name, inet_ntoa(state->lease.addr));