1 #include "stralloc.h" 2 #include "alloc.h" 3 #include "byte.h" 4 #include "dns.h" 5 dns_data_free(struct dns_data * r)6void dns_data_free(struct dns_data *r) { 7 8 dns_domain_free(&r->name); 9 stralloc_free(&r->result); 10 stralloc_free(&r->fqdn); 11 if (r->curvecpkey) alloc_free(r->curvecpkey); 12 if (r->dnscurvekey) alloc_free(r->dnscurvekey); 13 byte_zero(r, sizeof(struct dns_data)); 14 15 return; 16 } 17