[ldns-users] Memory leak in ldns_dnssec_zone_sign_nsec3 / ldns_dnssec_zone_deep_free

Michael J. Sheldon msheldon at godaddy.com
Wed Dec 17 17:55:24 UTC 2014

I'm seeing memory leaks in my app whenever I am signing NSEC3 zones (NSEC zones do not show this behaviour)

168 (24 direct, 144 indirect) bytes in 1 blocks are definitely lost in loss record 3 of 3
at 0x4A06A2E: malloc (vg_replace_malloc.c:270)
by 0x31BF8363BA: ldns_rbtree_create (in /usr/lib64/libldns.so.1.6.17)
by 0x31BF81E6EB: ??? (in /usr/lib64/libldns.so.1.6.17)
by 0x31BF81FF53: ldns_dnssec_zone_sign_nsec3_flg_mkmap (in /usr/lib64/libldns.so.1.6.17)
by 0x31BF820113: ldns_dnssec_zone_sign_nsec3 (in /usr/lib64/libldns.so.1.6.17)

One thing I noticed in the code docs, in ldns_dnssec_zone_free and ldns_dnssec_zone_deep_free, the names rbtree is freed, but the hashed_names rbtree is not.

Also, the _nsec3params member is not free'd though this is always NULL in my app, so no issues for me.

Michael Sheldon
Dev-DNS Services

More information about the ldns-users mailing list