Fixing memory leak in mem_pools_alloc.
This commit is contained in:
@@ -181,8 +181,11 @@ mem_pools_alloc( mem_pool_chunk_type_t chunk_type) /**< chunk type */
|
|||||||
if ( pool_space == NULL )
|
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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user