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 ce530c2c0601d4a8c0587aab9699cbef0b3c9d64..3e7f12948e478bc6bb0540ead0fd1a68a67685a5 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);