mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-02-19 00:39:46 +00:00
Fix NULL dereference in buffer-based allocator
This commit is contained in:
committed by
Paul Bakker
parent
765bb31d24
commit
547ff6618f
@@ -484,7 +484,8 @@ static void buffer_alloc_free( void *ptr )
|
||||
if( old == NULL )
|
||||
{
|
||||
hdr->next_free = heap.first_free;
|
||||
heap.first_free->prev_free = hdr;
|
||||
if( heap.first_free != NULL )
|
||||
heap.first_free->prev_free = hdr;
|
||||
heap.first_free = hdr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user