2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

3881. [bug] Address memory leak with UPDATE error handling.

[RT #36303]
This commit is contained in:
Mark Andrews 2014-06-18 11:21:31 +10:00
parent 651031a1ac
commit f5bb5eb7f6
2 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,6 @@
3881. [bug] Address memory leak with UPDATE error handling.
[RT #36303]
3880. [test] Update ans.pl to work with new TSIG support in
Net::DNS; add additional Net::DNS version prerequisite
checks. [RT #36327]

View File

@ -2944,10 +2944,18 @@ update_action(isc_task_t *task, isc_event_t *event) {
dns_diff_clear(&ctx.del_diff);
dns_diff_clear(&ctx.add_diff);
} else {
CHECK(do_diff(&ctx.del_diff, db, ver,
&diff));
CHECK(do_diff(&ctx.add_diff, db, ver,
&diff));
result = do_diff(&ctx.del_diff, db, ver,
&diff);
if (result == ISC_R_SUCCESS) {
result = do_diff(&ctx.add_diff,
db, ver,
&diff);
}
if (result != ISC_R_SUCCESS) {
dns_diff_clear(&ctx.del_diff);
dns_diff_clear(&ctx.add_diff);
goto failure;
}
CHECK(update_one_rr(db, ver, &diff,
DNS_DIFFOP_ADD,
name, ttl, &rdata));