]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- A memory leak in ddns processing was closed. [ISC-Bugs #21377]
authorDavid Hankins <dhankins@isc.org>
Mon, 24 May 2010 23:48:22 +0000 (23:48 +0000)
committerDavid Hankins <dhankins@isc.org>
Mon, 24 May 2010 23:48:22 +0000 (23:48 +0000)
RELNOTES
common/dns.c

index 3f9aa9ee92573bd1724e54e4b7d5570f7946ff17..e8db8d6e7879f0171f1ddb2a8c4fa2d18b7dbed7 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -48,6 +48,8 @@ work on other platforms. Please report any problems and suggested fixes to
   exit if it attempted to hash a zero length client id, providing attackers
   with a simple denial of service attack.  Bug ticket 21253.
 
+- A memory leak in ddns processing was closed.  [ISC-Bugs #21377]
+
                        Changes since 4.2.0a2
 
 - Update the fsync code to work with the changes to the DDNS code.  It now
index c7c84134f59060adf75b27ccf73435a624751ee1..5c2e5b3311a650e4a07f2c023486228d7fb5c8fa 100644 (file)
@@ -462,6 +462,11 @@ ddns_cb_free(dhcp_ddns_cb_t *ddns_cb, const char *file, int line)
                forget_zone((struct dns_zone **)&ddns_cb->zone);
        }
 
+       /* Should be freed by now, check just in case. */
+       if (ddns_cb->transaction != NULL)
+               log_error("Impossible memory leak at %s:%d (attempt to free "
+                         "DDNS Control Block before transaction).", MDL);
+
        dfree(ddns_cb, file, line);
 }
 
@@ -1241,7 +1246,7 @@ void ddns_interlude(isc_task_t  *taskp,
        }
 #endif
        /* This transaction is complete, clear the value */
-       ddns_cb->transaction = NULL;
+       dns_client_destroyupdatetrans(&ddns_cb->transaction);
 
        /* If we cancelled or tried to cancel the operation we just
         * need to clean up. */