From: Niels Provos Date: Sun, 9 Sep 2007 02:33:10 +0000 (+0000) Subject: Fix a memory leak in which failed HTTP connections whould not free the request object X-Git-Tag: release-2.0.1-alpha~579 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2f564116e1bcdcf2c6500c1552fcc25de810c53;p=libevent Fix a memory leak in which failed HTTP connections whould not free the request object svn:r419 --- diff --git a/ChangeLog b/ChangeLog index 7fb77107..f947d757 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,3 +4,4 @@ Changes in current version: o Fix Solaris compilation; from Magne Mahre o Add a "Date" header to HTTP responses, as required by HTTP 1.1. 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 diff --git a/http.c b/http.c index cd5da3ee..9b8b5106 100644 --- a/http.c +++ b/http.c @@ -992,6 +992,7 @@ evhttp_connectioncb(int fd, short what, void *arg) /* we might want to set an error here */ request->cb(request, request->cb_arg); + evhttp_request_free(request); } }