From: Pauli Date: Fri, 1 Apr 2022 01:12:07 +0000 (+1100) Subject: Fix coverity 1503330 use after free X-Git-Tag: openssl-3.2.0-alpha1~2696 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=588080cbf8e254ca2c033224146bc29fddea75a7;p=thirdparty%2Fopenssl.git 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) --- 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;