mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-08 20:02:06 -04:00
1884. [bug] process_dhtkey() was using the wrong memory context
to free some memory. [RT #14890]
This commit is contained in:
parent
f7d7c7ba43
commit
e8e62bb782
2 changed files with 7 additions and 4 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
1884. [bug] process_dhtkey() was using the wrong memory context
|
||||
to free some memory. [RT #14890]
|
||||
|
||||
1883. [port] sunos: portability fixes. [RT #14814]
|
||||
|
||||
1882. [port] win32: isc__errno2result() now reports its caller.
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* $Id: tkey.c,v 1.79 2005/04/29 00:22:53 marka Exp $
|
||||
* $Id: tkey.c,v 1.80 2005/06/10 06:58:27 marka Exp $
|
||||
*/
|
||||
/*! \file */
|
||||
#include <config.h>
|
||||
|
|
@ -356,7 +356,7 @@ process_dhtkey(dns_message_t *msg, dns_name_t *signer, dns_name_t *name,
|
|||
|
||||
isc_buffer_init(&secret, secretdata, sizeof(secretdata));
|
||||
|
||||
randomdata = isc_mem_get(tctx->mctx, TKEY_RANDOM_AMOUNT);
|
||||
randomdata = isc_mem_get(tkeyout->mctx, TKEY_RANDOM_AMOUNT);
|
||||
if (randomdata == NULL)
|
||||
goto failure;
|
||||
|
||||
|
|
@ -397,8 +397,8 @@ process_dhtkey(dns_message_t *msg, dns_name_t *signer, dns_name_t *name,
|
|||
isc_buffer_free(&shared);
|
||||
if (pubkey != NULL)
|
||||
dst_key_free(&pubkey);
|
||||
if (randomdata == NULL)
|
||||
isc_mem_put(tctx->mctx, randomdata, TKEY_RANDOM_AMOUNT);
|
||||
if (randomdata != NULL)
|
||||
isc_mem_put(tkeyout->mctx, randomdata, TKEY_RANDOM_AMOUNT);
|
||||
return (result);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue