]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Fix a memory leak in ldns-notify
authorWillem Toorop <willem@nlnetlabs.nl>
Sun, 21 Dec 2025 14:29:52 +0000 (15:29 +0100)
committerWillem Toorop <willem@nlnetlabs.nl>
Sun, 21 Dec 2025 14:29:52 +0000 (15:29 +0100)
Changelog
examples/ldns-notify.c

index 41b63cbb4dcd084985738702d456b52931c03f8c..a44ac76ec12a92ada180a9867030273093c62f6a 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,7 +1,8 @@
 1.9.1  2026-??-??
        * Fix #290: ldns-verify-zone prints to stdout instead of myerr
          Thanks RoyArends
-
+       * Fix memory leak in ldns-notify
+       
 1.9.0  2025-12-04
        * PR #246: Make ldns_calc_keytag() available for CDNSKEY RR
          Thanks tgreenx and pnax
index 0c4f68dfcc905d6310162da25321a322b827fd81..60b95d535f1d1169adc9a90cffc019c2e203cc1c 100644 (file)
@@ -312,11 +312,10 @@ main(int argc, char **argv)
        if(include_soa) {
                char buf[10240];
                ldns_rr *soa_rr=NULL;
-               ldns_rdf *prev=NULL;
                snprintf(buf, sizeof(buf), "%s 3600 IN SOA . . %u 0 0 0 0",
                        zone_name, (unsigned)soa_version);
                /*printf("Adding soa %s\n", buf);*/
-               status = ldns_rr_new_frm_str(&soa_rr, buf, 3600, NULL, &prev);
+               status = ldns_rr_new_frm_str(&soa_rr, buf, 3600, NULL, NULL);
                if(status != LDNS_STATUS_OK) {
                        printf("Error adding SOA version: %s\n",
                                ldns_get_errorstr_by_id(status));