diff --git a/ChangeLog b/ChangeLog index a01dfc61..e4d94f3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +* 2020-0?-??: Version 1.6.1-rc.1 + * Issue #466: Memory leak with retrying queries (for examples + with search paths). Thanks doublez13. + * 2020-02-28: Version 1.6.0 * Issues #457, #458, #461: New symbols with libnettle >= 3.4. Thanks hanvinke & kometchtech for testing & reporting. diff --git a/src/request-internal.c b/src/request-internal.c index eedea35c..f933e57f 100644 --- a/src/request-internal.c +++ b/src/request-internal.c @@ -317,6 +317,9 @@ _getdns_netreq_reinit(getdns_network_req *netreq) uint8_t *base_opt_backup; size_t base_opt_rr_sz; + if (netreq->response && (netreq->response < netreq->wire_data || + netreq->response > netreq->wire_data+ netreq->wire_data_sz)) + GETDNS_NULL_FREE(netreq->owner->my_mf, netreq->response); if (!netreq->query) { (void) netreq_reset(netreq); return; diff --git a/src/tools/getdns_query.c b/src/tools/getdns_query.c index 636292c5..fbbf242e 100644 --- a/src/tools/getdns_query.c +++ b/src/tools/getdns_query.c @@ -1440,7 +1440,7 @@ static void request_cb( dns_msg *msg = (dns_msg *)userarg; uint32_t qid; getdns_return_t r = GETDNS_RETURN_GOOD; - uint32_t n, rcode, dnssec_status; + uint32_t n, rcode, dnssec_status = GETDNS_DNSSEC_INDETERMINATE; #if defined(SERVER_DEBUG) && SERVER_DEBUG getdns_bindata *qname;