mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-01-06 06:28:56 +01:00
Fix memory leak in GCM by adding gcm_free()
This commit is contained in:
parent
deb7949a22
commit
4fe9200f47
4 changed files with 28 additions and 0 deletions
|
|
@ -49,6 +49,8 @@ void gcm_encrypt_and_tag( char *hex_key_string, char *hex_src_string,
|
|||
TEST_ASSERT( strcmp( (char *) dst_str, hex_dst_string ) == 0 );
|
||||
TEST_ASSERT( strcmp( (char *) tag_str, hex_tag_string ) == 0 );
|
||||
}
|
||||
|
||||
gcm_free( &ctx );
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
|
|
@ -101,6 +103,8 @@ void gcm_decrypt_and_verify( char *hex_key_string, char *hex_src_string,
|
|||
TEST_ASSERT( strcmp( (char *) dst_str, pt_result ) == 0 );
|
||||
}
|
||||
}
|
||||
|
||||
gcm_free( &ctx );
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue