Fix memory leak in GCM by adding gcm_free()

This commit is contained in:
Manuel Pégourié-Gonnard 2013-09-13 13:45:58 +02:00
parent deb7949a22
commit 4fe9200f47
4 changed files with 28 additions and 0 deletions

View file

@ -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 */