Gracefully free a NULL HANDSHAKE_RESULT
authorEmilia Kasper <emilia@openssl.org>
Tue, 9 Aug 2016 15:08:59 +0000 (17:08 +0200)
committerEmilia Kasper <emilia@openssl.org>
Wed, 10 Aug 2016 12:41:21 +0000 (14:41 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
test/handshake_helper.c

index ce530c2..3e7f129 100644 (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);