mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-19 17:17:04 -04:00
Merge branch '4406-cleanup-b-in-dnstap-main' into 'main'
Resolve "cleanup 'b' in dnstap-read main" Closes #4406 See merge request isc-projects/bind9!8455
This commit is contained in:
commit
83053ea740
1 changed files with 0 additions and 13 deletions
|
|
@ -336,7 +336,6 @@ int
|
|||
main(int argc, char *argv[]) {
|
||||
isc_result_t result;
|
||||
dns_message_t *message = NULL;
|
||||
isc_buffer_t *b = NULL;
|
||||
dns_dtdata_t *dt = NULL;
|
||||
dns_dthandle_t *handle = NULL;
|
||||
int rv = 0, ch;
|
||||
|
|
@ -392,17 +391,8 @@ main(int argc, char *argv[]) {
|
|||
input.base = data;
|
||||
input.length = datalen;
|
||||
|
||||
if (b != NULL) {
|
||||
isc_buffer_free(&b);
|
||||
}
|
||||
isc_buffer_allocate(mctx, &b, 2048);
|
||||
if (b == NULL) {
|
||||
fatal("out of memory");
|
||||
}
|
||||
|
||||
result = dns_dt_parse(mctx, &input, &dt);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_buffer_free(&b);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -431,9 +421,6 @@ cleanup:
|
|||
if (message != NULL) {
|
||||
dns_message_detach(&message);
|
||||
}
|
||||
if (b != NULL) {
|
||||
isc_buffer_free(&b);
|
||||
}
|
||||
isc_mem_destroy(&mctx);
|
||||
|
||||
exit(rv);
|
||||
|
|
|
|||
Loading…
Reference in a new issue