Skip to content

Commit

Permalink
fips indicator thread local using system malloc
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Jan 10, 2024
1 parent 3cd2542 commit 905d31a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crypto/fipsmodule/service_indicator/service_indicator.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static struct fips_service_indicator_state * service_indicator_get(void) {
AWSLC_THREAD_LOCAL_FIPS_SERVICE_INDICATOR_STATE);

if (indicator == NULL) {
indicator = OPENSSL_malloc(sizeof(struct fips_service_indicator_state));
indicator = malloc(sizeof(struct fips_service_indicator_state));
if (indicator == NULL) {
return NULL;
}
Expand All @@ -55,7 +55,7 @@ static struct fips_service_indicator_state * service_indicator_get(void) {

if (!CRYPTO_set_thread_local(
AWSLC_THREAD_LOCAL_FIPS_SERVICE_INDICATOR_STATE, indicator,
OPENSSL_free)) {
free)) {
OPENSSL_PUT_ERROR(CRYPTO, ERR_R_INTERNAL_ERROR);
return NULL;
}
Expand Down

0 comments on commit 905d31a

Please sign in to comment.