]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
fix Coverity 1506709: error handling
authorPauli <pauli@openssl.org>
Wed, 29 Jun 2022 01:23:27 +0000 (11:23 +1000)
committerPauli <pauli@openssl.org>
Fri, 1 Jul 2022 03:32:05 +0000 (13:32 +1000)
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18679)

test/fake_rsaprov.c

index 8f82f5987c61d18e418aed219cdb3f200d9772cc..d556551bb6f21f8a346c964b81514e710a51f2dd 100644 (file)
@@ -260,7 +260,8 @@ static void *fake_rsa_st_open(void *provctx, const char *uri)
         return NULL;
 
     storectx = OPENSSL_zalloc(1);
-    TEST_ptr(storectx);
+    if (!TEST_ptr(storectx))
+        return NULL;
 
     TEST_info("fake_rsa_open called");