Add cleanup frees in LMS and LMOTS tests

Signed-off-by: Raef Coles <raef.coles@arm.com>
This commit is contained in:
Raef Coles 2022-10-13 09:28:18 +01:00
parent 781f7bedb0
commit 20d2e06ca4
No known key found for this signature in database
GPG Key ID: 1AAF1B43DF2086F4
2 changed files with 6 additions and 0 deletions

View File

@ -142,6 +142,8 @@ void lmots_verify_test ( data_t *msg, data_t *sig, data_t *pub_key,
}
exit:
if( tmp_sig != NULL )
mbedtls_free( tmp_sig );
mbedtls_lmots_public_free( &ctx );
}
/* END_CASE */

View File

@ -138,6 +138,8 @@ void lms_verify_test ( data_t * msg, data_t * sig, data_t * pub_key,
}
exit:
if( tmp_sig != NULL )
mbedtls_free( tmp_sig );
mbedtls_lms_public_free( &ctx );
}
/* END_CASE */
@ -180,6 +182,8 @@ void lms_import_export_test ( data_t * pub_key, int expected_import_rc )
}
exit:
if( exported_pub_key != NULL )
mbedtls_free( exported_pub_key );
mbedtls_lms_public_free( &ctx );
}
/* END_CASE */