From: David Hankins Date: Mon, 24 May 2010 23:48:22 +0000 (+0000) Subject: - A memory leak in ddns processing was closed. [ISC-Bugs #21377] X-Git-Tag: v4_2_0b2~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=56d162f8cb8203993e4cf826cacada3185023ee7;p=thirdparty%2Fdhcp.git - A memory leak in ddns processing was closed. [ISC-Bugs #21377] --- diff --git a/RELNOTES b/RELNOTES index 3f9aa9ee9..e8db8d6e7 100644 --- 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 diff --git a/common/dns.c b/common/dns.c index c7c84134f..5c2e5b331 100644 --- a/common/dns.c +++ b/common/dns.c @@ -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. */