mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-04-29 19:24:37 +00:00
test: fix coverity 1451553: resource leak
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14596)
This commit is contained in:
parent
aff442dc38
commit
b573d0ceea
@ -540,8 +540,10 @@ static int test_param_construct(void)
|
||||
|| !TEST_true(OSSL_PARAM_set_utf8_string(cp, "abcdef"))
|
||||
|| !TEST_size_t_eq(cp->return_size, sizeof("abcdef") - 1)
|
||||
|| !TEST_true(OSSL_PARAM_get_utf8_string(cp, &bufp, 0))
|
||||
|| !TEST_str_eq(bufp, "abcdef"))
|
||||
|| !TEST_str_eq(bufp, "abcdef")) {
|
||||
OPENSSL_free(bufp);
|
||||
goto err;
|
||||
}
|
||||
OPENSSL_free(bufp);
|
||||
bufp = buf2;
|
||||
if (!TEST_true(OSSL_PARAM_get_utf8_string(cp, &bufp, sizeof(buf2)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user