]> granicus.if.org Git - libevent/commitdiff
Fix a memory leak in which failed HTTP connections whould not free the request object
authorNiels Provos <provos@gmail.com>
Sun, 9 Sep 2007 02:33:10 +0000 (02:33 +0000)
committerNiels Provos <provos@gmail.com>
Sun, 9 Sep 2007 02:33:10 +0000 (02:33 +0000)
svn:r419

ChangeLog
http.c

index 7fb7710793c50e015c1598c7ff32b0cd659a5438..f947d75750e2f344e4d5b52c3907fe0831fb78fd 100644 (file)
--- 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 cd5da3ee4dbbece3bb2cfda27bfc32b5a6ca1a05..9b8b5106db79461aa9445a314bd3da2af929d523 100644 (file)
--- 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);
        }
 }