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.21.21~41^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80fae7a4b7d8f9aa5aedb5f5ad34f90ce1ad3e77;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. --- diff --git a/lib/dns/xfrin.c b/lib/dns/xfrin.c index 783b7d0dd1f..feff048e9a6 100644 --- a/lib/dns/xfrin.c +++ b/lib/dns/xfrin.c @@ -686,6 +686,9 @@ ixfr_commit(dns_xfrin_t *xfr) { } cleanup: + if (result != ISC_R_SUCCESS) { + isc_mem_put(xfr->mctx, data, sizeof(*data)); + } return result; }