diff -Naur curl-7.82.0.orig/lib/vtls/openssl.c curl-7.82.0.new/lib/vtls/openssl.c --- curl-7.82.0.orig/lib/vtls/openssl.c 2022-03-27 00:50:18.807265131 +0100 +++ curl-7.82.0.new/lib/vtls/openssl.c 2022-03-27 00:50:35.727173562 +0100 @@ -1808,7 +1808,8 @@ memcpy(peer_CN, ASN1_STRING_get0_data(tmp), peerlen); peer_CN[peerlen] = '\0'; } - result = CURLE_OUT_OF_MEMORY; + else + result = CURLE_OUT_OF_MEMORY; } } else /* not a UTF8 name */