Skip to content

Commit

Permalink
fixed out of memory path for semaphore
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge authored and bugobliterator committed Jun 7, 2023
1 parent dbae5c2 commit 7446292
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions canard.c
Original file line number Diff line number Diff line change
Expand Up @@ -1850,6 +1850,9 @@ CANARD_INTERNAL void* allocateBlock(CanardPoolAllocator* allocator)
// Check if there are any blocks available in the free list.
if (allocator->free_list == NULL)
{
#if CANARD_ALLOCATE_SEM
canard_allocate_sem_give(allocator);
#endif
return NULL;
}

Expand Down

0 comments on commit 7446292

Please sign in to comment.