mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-22 14:49:20 -04:00
lib/dns/rdatalist.c: Fix dereference before DbC check
This commit is contained in:
parent
66af8713d8
commit
5fc7e98d29
1 changed files with 10 additions and 4 deletions
|
|
@ -238,14 +238,17 @@ isc_result_t
|
|||
isc__rdatalist_getnoqname(dns_rdataset_t *rdataset, dns_name_t *name,
|
||||
dns_rdataset_t *neg, dns_rdataset_t *negsig)
|
||||
{
|
||||
dns_rdataclass_t rdclass = rdataset->rdclass;
|
||||
dns_rdataclass_t rdclass;
|
||||
dns_rdataset_t *tneg = NULL;
|
||||
dns_rdataset_t *tnegsig = NULL;
|
||||
const dns_name_t *noqname = rdataset->private6;
|
||||
const dns_name_t *noqname;
|
||||
|
||||
REQUIRE(rdataset != NULL);
|
||||
REQUIRE((rdataset->attributes & DNS_RDATASETATTR_NOQNAME) != 0);
|
||||
|
||||
rdclass = rdataset->rdclass;
|
||||
noqname = rdataset->private6;
|
||||
|
||||
(void)dns_name_dynamic(noqname); /* Sanity Check. */
|
||||
|
||||
for (rdataset = ISC_LIST_HEAD(noqname->list);
|
||||
|
|
@ -329,14 +332,17 @@ isc_result_t
|
|||
isc__rdatalist_getclosest(dns_rdataset_t *rdataset, dns_name_t *name,
|
||||
dns_rdataset_t *neg, dns_rdataset_t *negsig)
|
||||
{
|
||||
dns_rdataclass_t rdclass = rdataset->rdclass;
|
||||
dns_rdataclass_t rdclass;
|
||||
dns_rdataset_t *tneg = NULL;
|
||||
dns_rdataset_t *tnegsig = NULL;
|
||||
const dns_name_t *closest = rdataset->private7;
|
||||
const dns_name_t *closest;
|
||||
|
||||
REQUIRE(rdataset != NULL);
|
||||
REQUIRE((rdataset->attributes & DNS_RDATASETATTR_CLOSEST) != 0);
|
||||
|
||||
rdclass = rdataset->rdclass;
|
||||
closest = rdataset->private7;
|
||||
|
||||
(void)dns_name_dynamic(closest); /* Sanity Check. */
|
||||
|
||||
for (rdataset = ISC_LIST_HEAD(closest->list);
|
||||
|
|
|
|||
Loading…
Reference in a new issue