Skip to content
Merged
Prev Previous commit
Next Next commit
fix possible null dereference
  • Loading branch information
lambdageek committed Apr 20, 2023
commit 8a14fb4361d63dd37bd1f969775402a2ec7060b2
3 changes: 2 additions & 1 deletion src/mono/mono/utils/lifo-semaphore.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ lifo_js_wait_entry_push (LifoSemaphoreAsyncWaitWaitEntry **head,
LifoSemaphoreAsyncWaitWaitEntry *next = *head;
*head = entry;
entry->next = next;
next->previous = entry;
if (next)
next->previous = entry;
}

static void
Expand Down