2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

Merge branch '2935-cid-339035-1-of-1-explicit-null-dereferenced-forward_null' into 'main'

Resolve "CID 339035 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)"

Closes #2935

See merge request isc-projects/bind9!5470
This commit is contained in:
Mark Andrews
2021-10-11 23:16:22 +00:00
2 changed files with 4 additions and 3 deletions

View File

@@ -1,3 +1,6 @@
5737. [bug] Address Coverity warning in lib/dns/dnssec.c.
[GL #2935]
5736. [placeholder] 5736. [placeholder]
5735. [cleanup] The result codes which BIND 9 uses internally are now 5735. [cleanup] The result codes which BIND 9 uses internally are now

View File

@@ -943,7 +943,6 @@ dns_dnssec_signmessage(dns_message_t *msg, dst_key_t *key) {
dst_context_t *ctx = NULL; dst_context_t *ctx = NULL;
isc_mem_t *mctx; isc_mem_t *mctx;
isc_result_t result; isc_result_t result;
bool signeedsfree = true;
REQUIRE(msg != NULL); REQUIRE(msg != NULL);
REQUIRE(key != NULL); REQUIRE(key != NULL);
@@ -1032,7 +1031,6 @@ dns_dnssec_signmessage(dns_message_t *msg, dst_key_t *key) {
dynbuf)); dynbuf));
isc_mem_put(mctx, sig.signature, sig.siglen); isc_mem_put(mctx, sig.signature, sig.siglen);
signeedsfree = false;
dns_message_takebuffer(msg, &dynbuf); dns_message_takebuffer(msg, &dynbuf);
@@ -1053,7 +1051,7 @@ failure:
if (dynbuf != NULL) { if (dynbuf != NULL) {
isc_buffer_free(&dynbuf); isc_buffer_free(&dynbuf);
} }
if (signeedsfree) { if (sig.signature != NULL) {
isc_mem_put(mctx, sig.signature, sig.siglen); isc_mem_put(mctx, sig.signature, sig.siglen);
} }
if (ctx != NULL) { if (ctx != NULL) {