mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
check for zone being NULL
This commit is contained in:
@@ -1084,21 +1084,23 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
|
|||||||
keyname, current_serial);
|
keyname, current_serial);
|
||||||
|
|
||||||
|
|
||||||
dns_zone_getraw(zone, &raw);
|
if (zone != NULL) {
|
||||||
mayberaw = (raw != NULL) ? raw : zone;
|
dns_zone_getraw(zone, &raw);
|
||||||
if ((client->attributes & NS_CLIENTATTR_WANTEXPIRE) != 0 &&
|
mayberaw = (raw != NULL) ? raw : zone;
|
||||||
dns_zone_gettype(mayberaw) == dns_zone_slave) {
|
if ((client->attributes & NS_CLIENTATTR_WANTEXPIRE) != 0 &&
|
||||||
isc_time_t expiretime;
|
dns_zone_gettype(mayberaw) == dns_zone_slave) {
|
||||||
isc_uint32_t secs;
|
isc_time_t expiretime;
|
||||||
dns_zone_getexpiretime(zone, &expiretime);
|
isc_uint32_t secs;
|
||||||
secs = isc_time_seconds(&expiretime);
|
dns_zone_getexpiretime(zone, &expiretime);
|
||||||
if (secs >= client->now && result == ISC_R_SUCCESS) {
|
secs = isc_time_seconds(&expiretime);
|
||||||
client->attributes |= NS_CLIENTATTR_HAVEEXPIRE;
|
if (secs >= client->now && result == ISC_R_SUCCESS) {
|
||||||
client->expire = secs - client->now;
|
client->attributes |= NS_CLIENTATTR_HAVEEXPIRE;
|
||||||
|
client->expire = secs - client->now;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if (raw != NULL)
|
||||||
|
dns_zone_detach(&raw);
|
||||||
}
|
}
|
||||||
if (raw != NULL)
|
|
||||||
dns_zone_detach(&raw);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Hand the context over to sendstream(). Set xfr to NULL;
|
* Hand the context over to sendstream(). Set xfr to NULL;
|
||||||
|
Reference in New Issue
Block a user