From 13b85edbe2cb9bb864b819c41e79ac2cb1b78994 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 8 Jan 2017 13:24:58 +0100 Subject: [PATCH] lib/curl/Request: postpone the curl_easy_cleanup() call When the request is done, only unregister the CURL* handle, but do not delete it yet - it may still be needed for CURLINFO_RESPONSE_CODE. --- src/lib/curl/Request.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/curl/Request.cxx b/src/lib/curl/Request.cxx index 84ea59b3b..ac791aa06 100644 --- a/src/lib/curl/Request.cxx +++ b/src/lib/curl/Request.cxx @@ -151,7 +151,7 @@ CurlRequest::FinishBody() void CurlRequest::Done(CURLcode result) { - FreeEasy(); + Stop(); try { if (result != CURLE_OK) {