diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-06-19 18:57:10 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-06-19 18:57:10 +0800 |
commit | 01dd138ede339e0722956de2c116599a596fcf32 (patch) | |
tree | 7b5bb903827ac8d9c1b6d5c873ecdb8d721bd7e8 | |
parent | 6374c26a020f7c0f551ee62078f7cfac61e14128 (diff) |
Clean up curl before log any error
-rw-r--r-- | request.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 } |