]> granicus.if.org Git - libevent/commitdiff
fix a memory leak in the dns server; found by valgrind
authorNiels Provos <provos@gmail.com>
Mon, 10 Sep 2007 01:30:11 +0000 (01:30 +0000)
committerNiels Provos <provos@gmail.com>
Mon, 10 Sep 2007 01:30:11 +0000 (01:30 +0000)
svn:r422

ChangeLog
evdns.c

index 9cadd7170d50855e1af64c400d120619b7dca2c9..6f82da9bff8bd7f5776e704005209ac322812a00 100644 (file)
--- 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 4b0510e95c96055a5004f6e055046fe9e58d9ddb..471f42a9a5ec87de0d649a7a13d914526e5cf120 100644 (file)
--- 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) {