]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
zone: fix a recent memory leak
authorDavid Vašek <david.vasek@nic.cz>
Tue, 14 Oct 2025 18:29:42 +0000 (20:29 +0200)
committerDavid Vašek <david.vasek@nic.cz>
Tue, 14 Oct 2025 18:55:57 +0000 (20:55 +0200)
src/knot/zone/zone-dump.c

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