Andre Guibert de Bruet fixed a memory leak in the function that verifies the

peer's name in the SSL certificate when built for OpenSSL. The leak happens
for libcurls with CURL_DOES_CONVERSIONS enabled that fail to convert the CN
name from UTF8.
This commit is contained in:
Daniel Stenberg
2007-05-22 19:51:44 +00:00
parent d7616d8a0a
commit a9d49769ff
3 changed files with 15 additions and 6 deletions

View File

@@ -1123,7 +1123,8 @@ static CURLcode verifyhost(struct connectdata *conn,
rc = Curl_convert_from_utf8(data, peer_CN, strlen(peer_CN));
/* Curl_convert_from_utf8 calls failf if unsuccessful */
if (rc != CURLE_OK) {
return(rc);
OPENSSL_free(peer_CN);
return rc;
}
}
#endif /* CURL_DOES_CONVERSIONS */