]> 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@isc.org>
Sat, 14 Mar 2026 12:48:08 +0000 (13:48 +0100)
The 'data' allocation was not freed when reaching the cleanup
label with an error result.

lib/dns/xfrin.c

index 783b7d0dd1ffcd7a219f4317fe764dacfb6bbb80..feff048e9a6b3a67fb9d94f20a77b0ca2b498476 100644 (file)
@@ -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;
 }