From: David Hankins Date: Fri, 24 Jul 2009 17:21:52 +0000 (+0000) Subject: - Fixed a fenceposting bug when a client had two host records configured, X-Git-Tag: v4_2_0a1~53 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=95f5d38cb3c61f779e63a08116ba595d43505500;p=thirdparty%2Fdhcp.git - Fixed a fenceposting bug when a client had two host records configured, one using 'uid' and the other using 'hardware ethernet'. [ISC-Bugs #19895] --- diff --git a/RELNOTES b/RELNOTES index bd7619b48..feca625c1 100644 --- a/RELNOTES +++ b/RELNOTES @@ -183,6 +183,9 @@ work on other platforms. Please report any problems and suggested fixes to Specifically, it detects if the caller passed a pointer and size pair that causes the pointer to integer-wrap past zero. +- Fixed a fenceposting bug when a client had two host records configured, + one using 'uid' and the other using 'hardware ethernet'. + Changes since 4.1.0b1 - A missing "else" in dhcrelay.c could have caused an interface not to diff --git a/server/dhcp.c b/server/dhcp.c index 487018c84..d322ecbda 100644 --- a/server/dhcp.c +++ b/server/dhcp.c @@ -1730,6 +1730,8 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp) } if (h) host_reference (&host, h, MDL); + if (hp != NULL) + host_dereference(&hp, MDL); } if (!host) { find_hosts_by_haddr (&hp, @@ -1743,9 +1745,9 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp) } if (h) host_reference (&host, h, MDL); + if (hp != NULL) + host_dereference(&hp, MDL); } - if (hp) - host_dereference (&hp, MDL); } /* If we have a host_decl structure, run the options associated