]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix memory leak in ixfr_commit() error path
authorOndřej Surý <ondrej@isc.org>
Sat, 14 Mar 2026 11:52:07 +0000 (12:52 +0100)
committerOndřej Surý <ondrej@sury.org>
Mon, 16 Mar 2026 09:50:22 +0000 (10:50 +0100)
The 'data' allocation was not freed when reaching the cleanup
label with an error result.

(cherry picked from commit 80fae7a4b7d8f9aa5aedb5f5ad34f90ce1ad3e77)

lib/dns/xfrin.c

index af717462ca747675864e044a20536236af6b2364..e7c4847c1e8728fae5307b727229677481e9c26e 100644 (file)
@@ -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;
 }