From: David VaĊĦek Date: Tue, 14 Oct 2025 18:29:42 +0000 (+0200) Subject: zone: fix a recent memory leak X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f68eb2ce8c1843df4c0afb2b313dedf817a7fee4;p=thirdparty%2Fknot-dns.git zone: fix a recent memory leak --- diff --git a/src/knot/zone/zone-dump.c b/src/knot/zone/zone-dump.c index bca23cccd9..c002b38ebc 100644 --- a/src/knot/zone/zone-dump.c +++ b/src/knot/zone/zone-dump.c @@ -157,6 +157,7 @@ int zone_dump_text(zone_contents_t *zone, zone_skip_t *skip, FILE *file, bool co if (comments) { if (fprintf(file, ";; Zone dump (Knot DNS %s)\n", PACKAGE_VERSION) < 0) { + free(buf); return knot_map_errno(); } }