mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Fixing memory leak in mem_pools_alloc.
This commit is contained in:
parent
2887332573
commit
d7e28e3a28
@ -179,12 +179,15 @@ mem_pools_alloc( mem_pool_chunk_type_t chunk_type) /**< chunk type */
|
||||
MEM_HEAP_ALLOC_LONG_TERM);
|
||||
|
||||
if ( pool_space == NULL )
|
||||
{
|
||||
{
|
||||
/**
|
||||
* Not enough memory.
|
||||
* Not enough memory. Freeing pool header that was allocated above.
|
||||
*/
|
||||
|
||||
mem_pool_free_chunk( &mem_pool_for_pool_headers, (uint8_t*) pool_state);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
mem_pool_init( pool_state,
|
||||
chunk_size,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user