A NULL pointer could be freed if error handling occured.
dst_context_t *ctx = NULL;
isc_mem_t *mctx;
isc_result_t result;
- bool signeedsfree = true;
REQUIRE(msg != NULL);
REQUIRE(key != NULL);
dynbuf));
isc_mem_put(mctx, sig.signature, sig.siglen);
- signeedsfree = false;
dns_message_takebuffer(msg, &dynbuf);
if (dynbuf != NULL) {
isc_buffer_free(&dynbuf);
}
- if (signeedsfree) {
+ if (sig.signature != NULL) {
isc_mem_put(mctx, sig.signature, sig.siglen);
}
if (ctx != NULL) {