commit | 61977614d84c7b4d6aeaecaa003977472d4114db | [log] [tgz] |
---|---|---|
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | Wed May 27 17:38:50 2015 +0200 |
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | Wed May 27 17:40:16 2015 +0200 |
tree | 1c62ab04f65a4dae91a3e5b079b4dabb2b3fae3e | |
parent | bc07c3a1f0403ea65a5c4f52583569c82385dc07 [diff] [blame] |
Fix memleak with repeated [gc]cm_setkey()
diff --git a/library/ccm.c b/library/ccm.c index 87f1886..e397e0a 100644 --- a/library/ccm.c +++ b/library/ccm.c
@@ -78,6 +78,8 @@ if( cipher_info->block_size != 16 ) return( POLARSSL_ERR_CCM_BAD_INPUT ); + cipher_free( &ctx->cipher_ctx ); + if( ( ret = cipher_init_ctx( &ctx->cipher_ctx, cipher_info ) ) != 0 ) return( ret );