From 588080cbf8e254ca2c033224146bc29fddea75a7 Mon Sep 17 00:00:00 2001 From: Pauli Date: Fri, 1 Apr 2022 12:12:07 +1100 Subject: [PATCH] Fix coverity 1503330 use after free This is a false positive resulting from confusion over up_ref/free. Reviewed-by: Tomas Mraz Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/18014) --- test/acvp_test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/acvp_test.c b/test/acvp_test.c index bbc77d0ae61..90a97e2bf4c 100644 --- a/test/acvp_test.c +++ b/test/acvp_test.c @@ -1381,6 +1381,8 @@ static int drbg_test(int id) res = 1; err: EVP_RAND_CTX_free(ctx); + /* Coverity is confused by the upref/free in EVP_RAND_CTX_new() subdue it */ + /* coverity[pass_freed_arg] */ EVP_RAND_CTX_free(parent); EVP_RAND_free(rand); return res; -- 2.47.2