Add calls to curl_close