Fix Coverity 1498613: resource leak
authorPauli <pauli@openssl.org>
Wed, 16 Mar 2022 03:07:45 +0000 (14:07 +1100)
committerPauli <pauli@openssl.org>
Wed, 23 Mar 2022 00:08:56 +0000 (11:08 +1100)
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17891)

test/helpers/handshake.c

index 0e503017aacf573c9e897a6936794a53a9c3b7b2..c415e29f995fdeed5d55584e64757324afa1a330 100644 (file)
@@ -1436,6 +1436,7 @@ static HANDSHAKE_RESULT *do_handshake_internal(
                                  test_ctx, extra, &server_ctx_data,
                                  &server2_ctx_data, &client_ctx_data)) {
         TEST_note("configure_handshake_ctx");
+        HANDSHAKE_RESULT_free(ret);
         return NULL;
     }