mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-21 18:10:37 -04:00
2403. [bug] TSIG context leak. [RT #18341]
This commit is contained in:
parent
47021cb467
commit
0d8333f087
3 changed files with 18 additions and 3 deletions
2
CHANGES
2
CHANGES
|
|
@ -1,3 +1,5 @@
|
|||
2403. [bug] TSIG context leak. [RT #18341]
|
||||
|
||||
2402. [port] Support Solaris 2.11 and over. [RT #18362]
|
||||
|
||||
2401. [bug] Expect to get E[MN]FILE errno internal_accept()
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: message.c,v 1.222.18.14 2007/08/28 07:20:04 tbox Exp $ */
|
||||
/* $Id: message.c,v 1.222.18.15 2008/07/28 08:46:11 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
|
@ -592,6 +592,9 @@ msgreset(dns_message_t *msg, isc_boolean_t everything) {
|
|||
msg->tsigkey = NULL;
|
||||
}
|
||||
|
||||
if (msg->tsigctx != NULL)
|
||||
dst_context_destroy(&msg->tsigctx);
|
||||
|
||||
if (msg->query.base != NULL) {
|
||||
if (msg->free_query != 0)
|
||||
isc_mem_put(msg->mctx, msg->query.base,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: xfrin.c,v 1.135.18.19 2008/07/23 23:33:02 marka Exp $ */
|
||||
/* $Id: xfrin.c,v 1.135.18.20 2008/07/28 08:46:11 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
|
@ -1051,6 +1051,8 @@ xfrin_send_request(dns_xfrin_ctx_t *xfr) {
|
|||
xfr->id++;
|
||||
xfr->nmsg = 0;
|
||||
msg->id = xfr->id;
|
||||
if (xfr->tsigctx != NULL)
|
||||
dst_context_destroy(&xfr->tsigctx);
|
||||
|
||||
CHECK(render(msg, xfr->mctx, &xfr->qbuffer));
|
||||
|
||||
|
|
@ -1186,7 +1188,10 @@ xfrin_recv_done(isc_task_t *task, isc_event_t *ev) {
|
|||
|
||||
CHECK(dns_message_settsigkey(msg, xfr->tsigkey));
|
||||
CHECK(dns_message_setquerytsig(msg, xfr->lasttsig));
|
||||
|
||||
msg->tsigctx = xfr->tsigctx;
|
||||
xfr->tsigctx = NULL;
|
||||
|
||||
if (xfr->nmsg > 0)
|
||||
msg->tcp_continuation = 1;
|
||||
|
||||
|
|
@ -1299,9 +1304,11 @@ xfrin_recv_done(isc_task_t *task, isc_event_t *ev) {
|
|||
xfr->nmsg++;
|
||||
|
||||
/*
|
||||
* Copy the context back.
|
||||
* Take the context back.
|
||||
*/
|
||||
INSIST(xfr->tsigctx == NULL);
|
||||
xfr->tsigctx = msg->tsigctx;
|
||||
msg->tsigctx = NULL;
|
||||
|
||||
dns_message_destroy(&msg);
|
||||
|
||||
|
|
@ -1397,6 +1404,9 @@ maybe_free(dns_xfrin_ctx_t *xfr) {
|
|||
if (xfr->tcpmsg_valid)
|
||||
dns_tcpmsg_invalidate(&xfr->tcpmsg);
|
||||
|
||||
if (xfr->tsigctx != NULL)
|
||||
dst_context_destroy(&xfr->tsigctx);
|
||||
|
||||
if ((xfr->name.attributes & DNS_NAMEATTR_DYNAMIC) != 0)
|
||||
dns_name_free(&xfr->name, xfr->mctx);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue