mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
cleanup of a reference leak
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Id: tsig.c,v 1.30 1999/11/02 23:40:05 bwelling Exp $
|
* $Id: tsig.c,v 1.31 1999/11/03 16:52:28 bwelling Exp $
|
||||||
* Principal Author: Brian Wellington
|
* Principal Author: Brian Wellington
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -588,22 +588,23 @@ dns_tsig_verify(isc_buffer_t *source, dns_message_t *msg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Find dns_tsigkey_t based on keyname */
|
/* Find dns_tsigkey_t based on keyname */
|
||||||
ret = dns_tsigkey_find(&tsigkey, keyname, &tsig->algorithm);
|
if (msg->tsigkey == NULL) {
|
||||||
if (ret != ISC_R_SUCCESS) {
|
ret = dns_tsigkey_find(&tsigkey, keyname, &tsig->algorithm);
|
||||||
msg->tsigstatus = dns_tsigerror_badkey;
|
if (ret != ISC_R_SUCCESS) {
|
||||||
msg->tsigkey = NULL;
|
msg->tsigstatus = dns_tsigerror_badkey;
|
||||||
/*
|
msg->tsigkey = NULL;
|
||||||
* this key must be deleted later - an empty key can be found
|
ret = dns_tsigkey_create(keyname, &tsig->algorithm,
|
||||||
* by calling dns_tsigkey_empty()
|
NULL, 0, ISC_FALSE, NULL,
|
||||||
*/
|
mctx, &msg->tsigkey);
|
||||||
ret = dns_tsigkey_create(keyname, &tsig->algorithm, NULL, 0,
|
if (ret != ISC_R_SUCCESS)
|
||||||
ISC_FALSE, NULL, mctx, &msg->tsigkey);
|
goto cleanup_struct;
|
||||||
if (ret != ISC_R_SUCCESS)
|
return (DNS_R_TSIGVERIFYFAILURE);
|
||||||
goto cleanup_struct;
|
}
|
||||||
return (DNS_R_TSIGVERIFYFAILURE);
|
msg->tsigkey = tsigkey;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
tsigkey = msg->tsigkey;
|
||||||
|
|
||||||
msg->tsigkey = tsigkey;
|
|
||||||
key = tsigkey->key;
|
key = tsigkey->key;
|
||||||
|
|
||||||
/* Is the time ok? */
|
/* Is the time ok? */
|
||||||
|
Reference in New Issue
Block a user