Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Add missing check for null pointer in free
Browse files Browse the repository at this point in the history
Change-Id: Ia87df1b6c879afb0cf7021925f482577a3f025ff
  • Loading branch information
b-sumner authored and searlmc1 committed Feb 1, 2023
1 parent 38caab2 commit 49dd756
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ockl/src/dm.cl
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,9 @@ __ockl_dm_dealloc(ulong addr)
{
// Check for non-block and handle elsewhere
if ((addr & 0xfffUL) == 0UL) {
non_slab_free(addr);
if (addr)
non_slab_free(addr);

return;
}

Expand Down

0 comments on commit 49dd756

Please sign in to comment.