summaryrefslogtreecommitdiff
path: root/request.c
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-06-19 18:57:10 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-06-19 18:57:10 +0800
commit01dd138ede339e0722956de2c116599a596fcf32 (patch)
tree7b5bb903827ac8d9c1b6d5c873ecdb8d721bd7e8 /request.c
parent6374c26a020f7c0f551ee62078f7cfac61e14128 (diff)
Clean up curl before log any error
Diffstat (limited to 'request.c')
-rw-r--r--request.c2
1 files changed, 1 insertions, 1 deletions
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
}