diff --git a/server/dhcp.c b/server/dhcp.c index 915d1b1a..c9b36325 100644 --- a/server/dhcp.c +++ b/server/dhcp.c @@ -4562,6 +4562,7 @@ int find_lease (struct lease **lp, #if defined (DEBUG_FIND_LEASE) log_info ("not choosing requested address (!)."); #endif + lease_dereference (&ip_lease, MDL); } else { #if defined (DEBUG_FIND_LEASE) log_info ("choosing lease on requested address."); @@ -4570,7 +4571,6 @@ int find_lease (struct lease **lp, if (lease -> host) host_dereference (&lease -> host, MDL); } - lease_dereference (&ip_lease, MDL); } /* If we got a lease that matched the client identifier, we may want