From 01dd138ede339e0722956de2c116599a596fcf32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= 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.2.3