aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-07-30 20:56:13 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2025-07-30 20:56:13 +0530
commitb7be433cfeb520cc8cd5c0020b8e8d16888bf8ec (patch)
treefc36462286a9c534cfb837168b0929cea6949e14 /src/util.c
parent772c4586f15ce3a92f786e228003fba4cebb1374 (diff)
util: get_wrapped() must return NULL if wrapper is NULL
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index d4a9677..9919c8b 100644
--- a/src/util.c
+++ b/src/util.c
@@ -56,5 +56,8 @@ wrap_ptr(void *ptr)
void *
get_wrapped(ptr_wrapper_t *wrapper)
{
+ if (wrapper == NULL)
+ return NULL;
+
return wrapper->ptr;
}