From 49dd756ee374d648beb3ecd593f419db425ef621 Mon Sep 17 00:00:00 2001 From: Brian Sumner Date: Sun, 22 Jan 2023 09:10:55 -0800 Subject: [PATCH] Add missing check for null pointer in free Change-Id: Ia87df1b6c879afb0cf7021925f482577a3f025ff --- ockl/src/dm.cl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ockl/src/dm.cl b/ockl/src/dm.cl index 49bbaa0..2b852f0 100644 --- a/ockl/src/dm.cl +++ b/ockl/src/dm.cl @@ -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; }