Merge branch '2010-potential-null-pointer-dereference-9-11-in-dnstap-c' into 'v9_11'

Resolve "Potential NULL pointer dereference (9.11) in dnstap.c"

See merge request isc-projects/bind9!3813
This commit is contained in:
Mark Andrews
2020-07-13 01:08:19 +00:00
2 changed files with 6 additions and 1 deletions
+3
View File
@@ -1,3 +1,6 @@
5463. [bug] Address potential NULL pointer dereference on out of
memory in dnstap.c. [GL #2010]
5462. [bug] Move LMDB locking from LMDB itself to named. [GL #1976]
5458. [bug] Prevent a theoretically possible NULL dereference caused
+3 -1
View File
@@ -895,7 +895,9 @@ dns_dt_open(const char *filename, dns_dtmode_t mode, isc_mem_t *mctx,
handle = NULL;
cleanup:
if (result != ISC_R_SUCCESS && handle->reader != NULL) {
if (result != ISC_R_SUCCESS &&
handle != NULL && handle->reader != NULL)
{
fstrm_reader_destroy(&handle->reader);
handle->reader = NULL;
}