From f80cdee7c1eee93d13c7dcbeda32dfca3e1e4059 Mon Sep 17 00:00:00 2001 From: Pauli Date: Wed, 29 Jun 2022 11:23:27 +1000 Subject: [PATCH] fix Coverity 1506709: error handling Reviewed-by: Shane Lontis Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/18679) --- test/fake_rsaprov.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/fake_rsaprov.c b/test/fake_rsaprov.c index 8f82f5987c6..d556551bb6f 100644 --- a/test/fake_rsaprov.c +++ b/test/fake_rsaprov.c @@ -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"); -- 2.47.2