When the dns_qp_getname() call returns an error the del_name() function
just returns without cleaning up the trasnaction.
Instead of returning, jump to a new label 'done:' similar to the code
written in the add_nm() function.
result = dns_qp_getname(qp, trig_name, DNS_DBNAMESPACE_NORMAL,
(void **)&data, NULL);
if (result != ISC_R_SUCCESS) {
- return;
+ INSIST(data == NULL);
+ goto done;
}
INSIST(data != NULL);
RWUNLOCK(&rpz->rpzs->search_lock, isc_rwlocktype_write);
}
+done:
dns_qp_compact(qp, DNS_QPGC_MAYBE);
dns_qpmulti_commit(rpzs->table, &qp);
}