mirror of
https://github.com/monero-project/monero.git
synced 2024-12-14 04:16:32 +02:00
Merge pull request #1423
19585d49
mnemonics: fix misc STL containers leak (moneromooo-monero)f6fcf0ef
oaes_lib: fix a leak on OOM error path (moneromooo-monero)
This commit is contained in:
commit
7141d317df
@ -639,7 +639,10 @@ 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++ )
|
||||
#ifdef OAES_HAVE_ISAAC
|
||||
|
@ -106,6 +106,12 @@ namespace Language
|
||||
trimmed_word_map = new std::unordered_map<std::string, uint32_t>;
|
||||
unique_prefix_length = 4;
|
||||
}
|
||||
virtual ~Base()
|
||||
{
|
||||
delete word_list;
|
||||
delete word_map;
|
||||
delete trimmed_word_map;
|
||||
}
|
||||
/*!
|
||||
* \brief Returns a pointer to the word list.
|
||||
* \return A pointer to the word list.
|
||||
|
Loading…
Reference in New Issue
Block a user