diff --git a/src/context.c b/src/context.c index c1e0d7c5..c8f14363 100644 --- a/src/context.c +++ b/src/context.c @@ -728,6 +728,8 @@ _getdns_upstreams_dereference(getdns_upstreams *upstreams) { _getdns_closesocket(upstream->fd); } + if (upstream->tcp.read_buf) + GETDNS_FREE(upstreams->mf, upstream->tcp.read_buf); while (pin) { sha256_pin_t *nextpin = pin->next; GETDNS_FREE(upstreams->mf, pin);