[ldns-users] Bug in tsig code?

Michael Sheldon msheldon at godaddy.com
Thu May 24 21:00:20 UTC 2012


Valgrind is popping me on memory errors:

==8692== 16 bytes in 1 blocks are definitely lost in loss record 1 of 2
==8692==    at 0x4A05FDE: malloc (vg_replace_malloc.c:236)
==8692==    by 0x301542F3A9: ldns_rdf_new_frm_data (rdata.c:207)
==8692==    by 0x301543A134: ldns_tsig_mac_new (tsig.c:181)
==8692==    by 0x301543A882: ldns_pkt_tsig_sign_next (tsig.c:428)
==8692==    by 0x301543A9A2: ldns_pkt_tsig_sign (tsig.c:357)

==8692== 26 bytes in 1 blocks are definitely lost in loss record 2 of 2
==8692==    at 0x4A05FDE: malloc (vg_replace_malloc.c:236)
==8692==    by 0x301542F3A9: ldns_rdf_new_frm_data (rdata.c:207)
==8692==    by 0x301543A141: ldns_tsig_mac_new (tsig.c:182)
==8692==    by 0x301543A882: ldns_pkt_tsig_sign_next (tsig.c:428)
==8692==    by 0x301543A9A2: ldns_pkt_tsig_sign (tsig.c:357)

Looks to me that in tsic.c

00269         ldns_rdf_free(canonical_algorithm_rdf);
00270         ldns_rdf_free(canonical_key_name_rdf);

Should be ldns_rdf_deep_free()

these were allocated at:

00181         canonical_key_name_rdf  = ldns_rdf_clone(key_name_rdf);
00182         canonical_algorithm_rdf = ldns_rdf_clone(algorithm_rdf);

Michael Sheldon
Dev-DNS Services
GoDaddy.com






More information about the ldns-users mailing list