aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ssluse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ssluse.c b/lib/ssluse.c
index 5c2999dfa..76c3bd846 100644
--- a/lib/ssluse.c
+++ b/lib/ssluse.c
@@ -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 */