[ldns-users] [PATCH] Fix memory leak in ldns_dname2buffer_wire_compress
Willem Toorop
willem at nlnetlabs.nl
Thu Sep 11 09:57:56 UTC 2014
Absolutely. Also a clear bug. Committed. Thanks!
Op 05-09-14 om 18:19 schreef Max Liebkies:
> Hi,
>
> to keep up with Johannes' post from yesterday, here's another patch to
> fix a memory leak in ldns.
>
> In host2wire.c:ldns_dname2buffer_wire_compress() label and rest are both
> created by memcpy'ing the data contained in name, via ldns_dname_label()
> and ldns_dname_left_chop() respectively. On return (or recursion) they
> get freed but not deep freed. This leaves the data contained therein
> laying around.
>
> I tested the patch and it seems to fix the issue, altough I'm not 100%
> sure I understood the recursive nature of the function correctly. ;-)
>
> Cheers,
> Max
>
>
>
> _______________________________________________
> ldns-users mailing list
> ldns-users at open.nlnetlabs.nl
> http://open.nlnetlabs.nl/mailman/listinfo/ldns-users
>
More information about the ldns-users
mailing list