Gracefully free a NULL HANDSHAKE_RESULT

Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
Emilia Kasper 2016-08-09 17:08:59 +02:00
parent d61f00780a
commit 2f35e6a3eb

View File

@ -25,6 +25,8 @@ HANDSHAKE_RESULT *HANDSHAKE_RESULT_new()
void HANDSHAKE_RESULT_free(HANDSHAKE_RESULT *result)
{
if (result == NULL)
return;
OPENSSL_free(result->client_npn_negotiated);
OPENSSL_free(result->server_npn_negotiated);
OPENSSL_free(result->client_alpn_negotiated);