*/
result = curl_easy_getinfo(curltls, CURLINFO_TLS_SSL_PTR,
&tls_backend_info);
- if(result)
+ if(result) {
+ curl_easy_cleanup(curltls);
return result;
+ }
/* Set the CA cert locations specified in the environment. For Windows if
* no environment-specified filename is found then check for CA bundle
config->cacert = strdup(env);
if(!config->cacert) {
curl_free(env);
+ curl_easy_cleanup(curltls);
errorf(global, "out of memory\n");
return CURLE_OUT_OF_MEMORY;
}
config->capath = strdup(env);
if(!config->capath) {
curl_free(env);
+ curl_easy_cleanup(curltls);
helpf(global->errors, "out of memory\n");
return CURLE_OUT_OF_MEMORY;
}
config->cacert = strdup(env);
if(!config->cacert) {
curl_free(env);
+ curl_easy_cleanup(curltls);
errorf(global, "out of memory\n");
return CURLE_OUT_OF_MEMORY;
}