Fix static analysis issue
This commit is contained in:
parent
d855742379
commit
115ad827a8
1 changed files with 4 additions and 0 deletions
|
|
@ -633,7 +633,11 @@ static OAES_RET oaes_key_gen( OAES_CTX * ctx, size_t key_size )
|
|||
_key->data = (uint8_t *) calloc( key_size, sizeof( uint8_t ));
|
||||
|
||||
if( NULL == _key->data )
|
||||
{
|
||||
free(_key);
|
||||
return OAES_RET_MEM;
|
||||
}
|
||||
|
||||
|
||||
for( _i = 0; _i < key_size; _i++ )
|
||||
_key->data[_i] = (uint8_t) OAES_RAND(_ctx->rctx);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue