Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
c-hyper: fix a memory leak in
Curl_http
.
A request created with `hyper_request_new` must be consumed by either `hyper_clientconn_send` or `hyper_request_free`. This is not terrifically clear from the hyper docs -- `hyper_request_free` is documented only with "Free an HTTP request if not going to send it on a client" -- but a perusal of the hyper code confirms it. This commit adds a `hyper_request_free` to the `error:` path in `Curl_http` so that the request is consumed when an error occurs after the request is created but before it is sent. Fixes the first memory leak reported by Valgrind in #10803. Closes #11729
- Loading branch information