Coverity recorded issues
1551739 and
1551737, a potential double free in the
tests. It occurs when the DUP operation fails in such a way val3_read is
returned as the same pointer as val2_read. Ideally it should never
happen, but resetting val3_read to 0 should satisfy coverity that there
is no issue here
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/22800)
} else { \
if (DUP && val1_read == val1) { \
TEST_error("first set did not dup the value"); \
+ val1_read = 0; \
res = 0; \
} \
if (DEFAULT(val1_read)) { \
} else { \
if (DUP && val2_read == val2) { \
TEST_error("second set did not dup the value"); \
+ val2_read = 0; \
res = 0; \
} \
if (val2 == val1) { \
} else { \
if (DUP && val3_read == val2_read) { \
TEST_error("third get did not create a new dup"); \
+ val3_read = 0; \
res = 0; \
} \
} \