From: Eugene Syromiatnikov Date: Mon, 15 Sep 2025 02:05:04 +0000 (+0200) Subject: test/wpackettest.c: remove bogus cleanup() in test_WPACKET_quic_vlint_random() X-Git-Tag: openssl-3.3.5~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6d79dec2eb86d73fdf0dfbd974b0cd77b63a457e;p=thirdparty%2Fopenssl.git test/wpackettest.c: remove bogus cleanup() in test_WPACKET_quic_vlint_random() In the beginning of the iteration, pkt is not initialised yet, so there is no need to clean it up on RAND_bytes() failure. Replace "return cleanup(&pkt)" with plain "return 0". Fixes: 416d0a638c16 "QUIC wire format support" Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1665422 References: https://github.com/openssl/project/issues/1432 Signed-off-by: Eugene Syromiatnikov Reviewed-by: Paul Dale Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/28648) (cherry picked from commit 68f7f1295a77b5ca3b37b71a4079d7fe26bcd1c3) --- diff --git a/test/wpackettest.c b/test/wpackettest.c index c323e65ca9d..0c7cba36615 100644 --- a/test/wpackettest.c +++ b/test/wpackettest.c @@ -588,7 +588,7 @@ static int test_WPACKET_quic_vlint_random(void) for (i = 0; i < 10000; ++i) { if (!TEST_int_gt(RAND_bytes(rand_data, sizeof(rand_data)), 0)) - return cleanup(&pkt); + return 0; memcpy(&expected, rand_data, sizeof(uint64_t));