Commit 08c996c8 authored by Mark Andrews's avatar Mark Andrews

Merge branch '2200-the-fuzzer-dns_message_parser-c-is-leaking-memory' into 'main'

Resolve "The fuzzer dns_message_parse.c is leaking memory."

Closes #2200

See merge request isc-projects/bind9!4239
parents 40e54142 0d978878
......@@ -92,7 +92,7 @@ print_message(dns_message_t *message) {
{ \
r = (f); \
if (r != ISC_R_SUCCESS) { \
return (r); \
goto cleanup; \
} \
}
......@@ -110,7 +110,10 @@ render_message(dns_message_t **messagep) {
message->counts[i] = 0;
}
CHECKRESULT(result, dns_compress_init(&cctx, -1, mctx));
result = dns_compress_init(&cctx, -1, mctx);
if (result != ISC_R_SUCCESS) {
return (result);
}
CHECKRESULT(result, dns_message_renderbegin(message, &cctx, &buffer));
CHECKRESULT(result, dns_message_rendersection(message,
......@@ -135,6 +138,10 @@ render_message(dns_message_t **messagep) {
result = parse_message(&buffer, messagep);
return (result);
cleanup:
dns_compress_invalidate(&cctx);
return (result);
}
int
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment