]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Update slh_dsa_test.c
authorAndrew Dinh <andrewd@openssl.org>
Wed, 26 Feb 2025 14:35:47 +0000 (21:35 +0700)
committerNeil Horman <nhorman@openssl.org>
Thu, 27 Feb 2025 15:23:38 +0000 (10:23 -0500)
Fix https://scan5.scan.coverity.com/#/project-view/62507/10222?selectedIssue=1642943

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26916)

test/slh_dsa_test.c

index 9deb672baee3c9dea805387b3ba22fac5ab35d3f..2d7ac2d921147b4cdca944dc248a108159824ffd 100644 (file)
@@ -311,7 +311,7 @@ static EVP_PKEY *do_gen_key(const char *alg,
             || !TEST_int_eq(EVP_PKEY_keygen_init(ctx), 1)
             || !TEST_int_eq(EVP_PKEY_CTX_set_params(ctx, params), 1)
             || !TEST_int_eq(EVP_PKEY_generate(ctx, &pkey), 1))
-        goto err;
+        pkey = NULL;
 err:
     EVP_PKEY_CTX_free(ctx);
     return pkey;