]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- Fixed a fenceposting bug when a client had two host records configured,
authorDavid Hankins <dhankins@isc.org>
Fri, 24 Jul 2009 17:21:52 +0000 (17:21 +0000)
committerDavid Hankins <dhankins@isc.org>
Fri, 24 Jul 2009 17:21:52 +0000 (17:21 +0000)
  one using 'uid' and the other using 'hardware ethernet'.  [ISC-Bugs #19895]

RELNOTES
server/dhcp.c

index bd7619b483393eff820ac0efef9d4b8c1b3767b0..feca625c18dbee8a8ae226d4336e8bfe75b956d2 100644 (file)
--- 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
index 487018c8464ef6bc89e14226f809c432788395de..d322ecbdaee7c71f9c0b65d80937c4509b549c42 100644 (file)
@@ -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