Commit 93c958f0 authored by Daniel Salzman's avatar Daniel Salzman

axfr: fix double free when failed to sign the zone

fixes #587
parent ce76dcd7
......@@ -241,6 +241,9 @@ static int axfr_finalize(struct refresh_data *data)
return ret;
// Seized by zone_update. Don't free the contents again in axfr_cleanup.
data-> = NULL;
conf_val_t val = conf_zone_get(data->conf, C_DNSSEC_SIGNING, data->zone->name);
bool dnssec_enable = conf_bool(&val);
if (dnssec_enable) {
......@@ -272,7 +275,6 @@ static int axfr_finalize(struct refresh_data *data)
xfr_log_publish(data->zone->name, data->remote, old_serial,
zone_contents_serial(new_zone), bootstrap);
data-> = NULL; // seized
return KNOT_EOK;
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