mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-08 20:12:06 -04:00
4060. [bug] dns_rdata_freestruct could be call on a uninitialised
structure when handling a error. [RT #38568]
This commit is contained in:
parent
f5e4daf2ba
commit
f4102ab13e
2 changed files with 7 additions and 1 deletions
3
CHANGES
3
CHANGES
|
|
@ -1,3 +1,6 @@
|
|||
4060. [bug] dns_rdata_freestruct could be call on a uninitialised
|
||||
structure when handling a error. [RT #38568]
|
||||
|
||||
4059. [bug] Addressed valgrind warnings. [RT #38549]
|
||||
|
||||
4058. [bug] UDP dispatches could use the wrong psuedorandom
|
||||
|
|
|
|||
|
|
@ -1403,6 +1403,7 @@ dns_tkey_gssnegotiate(dns_message_t *qmsg, dns_message_t *rmsg,
|
|||
dst_key_t *dstkey = NULL;
|
||||
isc_result_t result;
|
||||
unsigned char array[1024];
|
||||
isc_boolean_t freertkey = ISC_FALSE;
|
||||
|
||||
REQUIRE(qmsg != NULL);
|
||||
REQUIRE(rmsg != NULL);
|
||||
|
|
@ -1415,6 +1416,7 @@ dns_tkey_gssnegotiate(dns_message_t *qmsg, dns_message_t *rmsg,
|
|||
|
||||
RETERR(find_tkey(rmsg, &tkeyname, &rtkeyrdata, DNS_SECTION_ANSWER));
|
||||
RETERR(dns_rdata_tostruct(&rtkeyrdata, &rtkey, NULL));
|
||||
freertkey = ISC_TRUE;
|
||||
|
||||
if (win2k == ISC_TRUE)
|
||||
RETERR(find_tkey(qmsg, &tkeyname, &qtkeyrdata,
|
||||
|
|
@ -1467,7 +1469,8 @@ dns_tkey_gssnegotiate(dns_message_t *qmsg, dns_message_t *rmsg,
|
|||
/*
|
||||
* XXXSRA This probably leaks memory from qtkey.
|
||||
*/
|
||||
dns_rdata_freestruct(&rtkey);
|
||||
if (freertkey)
|
||||
dns_rdata_freestruct(&rtkey);
|
||||
if (dstkey != NULL)
|
||||
dst_key_free(&dstkey);
|
||||
return (result);
|
||||
|
|
|
|||
Loading…
Reference in a new issue