From: Ondřej Surý Date: Sat, 14 Mar 2026 11:52:07 +0000 (+0100) Subject: Fix memory leak in ixfr_commit() error path X-Git-Tag: v9.20.22~29^2~5 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=644c012c0d13c382f1b31762771a0d4719ead161;p=thirdparty%2Fbind9.git Fix memory leak in ixfr_commit() error path The 'data' allocation was not freed when reaching the cleanup label with an error result. (cherry picked from commit 80fae7a4b7d8f9aa5aedb5f5ad34f90ce1ad3e77) --- diff --git a/lib/dns/xfrin.c b/lib/dns/xfrin.c index af717462ca7..e7c4847c1e8 100644 --- a/lib/dns/xfrin.c +++ b/lib/dns/xfrin.c @@ -677,6 +677,9 @@ ixfr_commit(dns_xfrin_t *xfr) { } cleanup: + if (result != ISC_R_SUCCESS) { + isc_mem_put(xfr->mctx, data, sizeof(*data)); + } return result; }