[ldns-users] Memory leak in rdata.c
    Calle Dybedahl 
    calle.dybedahl at init.se
       
    Fri Mar 20 09:39:34 UTC 2015
    
    
  
The function ldns_rdf_free() frees the RDF structure, but not the data it points to. This tiny patch makes valgrind complain less.
diff --git a/rdata.c b/rdata.c
index 6eb0096..65f057f 100644
--- a/rdata.c
+++ b/rdata.c
@@ -241,6 +241,7 @@ void
 ldns_rdf_free(ldns_rdf *rd)
 {
 	if (rd) {
+		LDNS_FREE(rd->_data);
 		LDNS_FREE(rd);
 	}
 }
— 
Calle Dybedahl
calle.dybedahl at init.se
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nlnetlabs.nl/pipermail/ldns-users/attachments/20150320/cc136f37/attachment.htm>
    
    
More information about the ldns-users
mailing list