summaryrefslogtreecommitdiffstats
path: root/test/property_test.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2019-08-21 09:58:10 +0200
committerRichard Levitte <levitte@openssl.org>2019-08-22 01:50:30 +0200
commitb1d40ddfe23fd9551b89cdcfa52d1c23fc667f8a (patch)
tree1eb6cc4b725753f4f20a5e2ded72fcd1a919a114 /test/property_test.c
parentd32d304836caaca475c21a82b94e494898cb60c5 (diff)
Modify ossl_method_store_add() to handle reference counting
Because this function affects the reference count on failure (the call to impl_free() does this), it may as well handle incrementing it as well to indicate the extra reference in the method store. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9650)
Diffstat (limited to 'test/property_test.c')
-rw-r--r--test/property_test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/property_test.c b/test/property_test.c
index 765416a11d..a47dcfc09b 100644
--- a/test/property_test.c
+++ b/test/property_test.c
@@ -241,7 +241,7 @@ static int test_register_deregister(void)
for (i = 0; i < OSSL_NELEM(impls); i++)
if (!TEST_true(ossl_method_store_add(store, impls[i].nid, impls[i].prop,
- impls[i].impl, NULL))) {
+ impls[i].impl, NULL, NULL))) {
TEST_note("iteration %zd", i + 1);
goto err;
}
@@ -308,7 +308,7 @@ static int test_property(void)
for (i = 0; i < OSSL_NELEM(impls); i++)
if (!TEST_true(ossl_method_store_add(store, impls[i].nid, impls[i].prop,
- impls[i].impl, NULL))) {
+ impls[i].impl, NULL, NULL))) {
TEST_note("iteration %zd", i + 1);
goto err;
}
@@ -347,7 +347,7 @@ static int test_query_cache_stochastic(void)
for (i = 1; i <= max; i++) {
v[i] = 2 * i;
BIO_snprintf(buf, sizeof(buf), "n=%d\n", i);
- if (!TEST_true(ossl_method_store_add(store, i, buf, "abc", NULL))
+ if (!TEST_true(ossl_method_store_add(store, i, buf, "abc", NULL, NULL))
|| !TEST_true(ossl_method_store_cache_set(store, i, buf, v + i))
|| !TEST_true(ossl_method_store_cache_set(store, i, "n=1234",
"miss"))) {