From 01dd138ede339e0722956de2c116599a596fcf32 Mon Sep 17 00:00:00 2001 From: ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ Date: Sat, 19 Jun 2021 18:57:10 +0800 Subject: Clean up curl before log any error --- request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/request.c b/request.c index 72cbf1c..cee61a1 100644 --- a/request.c +++ b/request.c @@ -151,6 +151,7 @@ void request(void (*handler)(icclient_response *), void (*callback)(void *), str CURLcode res = curl_easy_perform(curl); if (post) curl_formfree(post); + curl_easy_cleanup(curl); if (res == CURLE_OK && handler) handler(response); #ifdef DEBUG @@ -163,6 +164,5 @@ void request(void (*handler)(icclient_response *), void (*callback)(void *), str #endif } #endif - curl_easy_cleanup(curl); #endif } -- cgit v1.3