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:09:42 +0000 (11:09 +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)

(cherry picked from commit 6889ebff01fa8cd7e5905f3f242edfed55fca443)

test/helpers/handshake.c

index 64b6919f70303d4ef927b5b5710318c4e0d99a00..285391bc03b64f74e31f74c1a5c8f5a230d7abd5 100644 (file)
@@ -1432,6 +1432,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;
     }