From: Niels Provos Date: Mon, 10 Sep 2007 01:30:11 +0000 (+0000) Subject: fix a memory leak in the dns server; found by valgrind X-Git-Tag: release-2.0.1-alpha~577 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7c66bf33e18939d7ee6fabc47ed624c8caa6c46c;p=libevent fix a memory leak in the dns server; found by valgrind svn:r422 --- diff --git a/ChangeLog b/ChangeLog index 9cadd717..6f82da9b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,3 +6,4 @@ Changes in current version: o Support specifying the local address of an evhttp_connection using set_local_address o Fix a memory leak in which failed HTTP connections whould not free the request object o Make adding of array members in event_rpcgen more efficient, but doubling memory allocation + o Fix a memory leak in the DNS server diff --git a/evdns.c b/evdns.c index 4b0510e9..471f42a9 100644 --- a/evdns.c +++ b/evdns.c @@ -1729,6 +1729,7 @@ server_request_free(struct server_request *req) if (req->base.questions) { for (i = 0; i < req->base.nquestions; ++i) free(req->base.questions[i]); + free(req->base.questions); } if (req->port) {