@@ -34,7 +34,7 @@ typedef struct psa_spm_hash_clone_s {
34
34
} psa_spm_hash_clone_t ;
35
35
36
36
// ---------------------------------- Globals ----------------------------------
37
- static int psa_spm_init_refence_counter = 0 ;
37
+ static int psa_spm_init_count = 0 ;
38
38
39
39
/* maximal memory allocation for reading large hash or mac input buffers.
40
40
the data will be read in chunks of size */
@@ -138,8 +138,8 @@ static void psa_crypto_init_operation(void)
138
138
case PSA_IPC_CALL : {
139
139
status = psa_crypto_init ();
140
140
if (status == PSA_SUCCESS ) {
141
- ++ psa_spm_init_refence_counter ;
142
- if (psa_spm_init_refence_counter == 1 ) {
141
+ ++ psa_spm_init_count ;
142
+ if (psa_spm_init_count == 1 ) {
143
143
memset (psa_spm_hash_clones , 0 , sizeof (psa_spm_hash_clones ));
144
144
psa_crypto_access_control_init ();
145
145
}
@@ -175,11 +175,11 @@ static void psa_crypto_free_operation(void)
175
175
/** perform crypto_free iff the number of init-s
176
176
* is equal to the number of free-s
177
177
*/
178
- if (psa_spm_init_refence_counter > 0 ) {
179
- -- psa_spm_init_refence_counter ;
178
+ if (psa_spm_init_count > 0 ) {
179
+ -- psa_spm_init_count ;
180
180
}
181
181
182
- if (psa_spm_init_refence_counter == 0 ) {
182
+ if (psa_spm_init_count == 0 ) {
183
183
memset (psa_spm_hash_clones , 0 , sizeof (psa_spm_hash_clones ));
184
184
psa_crypto_access_control_destroy ();
185
185
mbedtls_psa_crypto_free ();
0 commit comments