Skip to content

Commit

Permalink
unload before free
Browse files Browse the repository at this point in the history
  • Loading branch information
baentsch committed Mar 6, 2024
1 parent 8be88ad commit 6c7c9da
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/oqs_test_kems.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ int main(int argc, char *argv[])
}
}

OSSL_LIB_CTX_free(libctx);
if (OPENSSL_VERSION_PREREQ(3, 1))
OSSL_PROVIDER_unload(oqsprov); // avoid crash in 3.0.x
OSSL_LIB_CTX_free(libctx);
TEST_ASSERT(errcnt == 0)
return !test;
}
2 changes: 1 addition & 1 deletion test/oqs_test_signatures.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ int main(int argc, char *argv[])
}
}

OSSL_LIB_CTX_free(libctx);
if (OPENSSL_VERSION_PREREQ(3, 1))
OSSL_PROVIDER_unload(oqsprov); // avoid crash in 3.0.x
OSSL_LIB_CTX_free(libctx);

TEST_ASSERT(errcnt == 0)
return !test;
Expand Down
2 changes: 1 addition & 1 deletion test/oqs_test_tlssig.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ int main(int argc, char *argv[])
"TLS-SIG handshake test not enabled. Update OpenSSL to more current version.\n");
#endif

OSSL_LIB_CTX_free(libctx);
if (OPENSSL_VERSION_PREREQ(3, 1))
OSSL_PROVIDER_unload(oqsprov); // avoid crash in 3.0.x
OSSL_LIB_CTX_free(libctx);
TEST_ASSERT(errcnt == 0)
return !test;
}

0 comments on commit 6c7c9da

Please sign in to comment.