summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr/src/uts/common/os/cpu_uarray.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/src/uts/common/os/cpu_uarray.c b/usr/src/uts/common/os/cpu_uarray.c
index b26b89e61a..8fb4b31e26 100644
--- a/usr/src/uts/common/os/cpu_uarray.c
+++ b/usr/src/uts/common/os/cpu_uarray.c
@@ -10,7 +10,7 @@
*/
/*
- * Copyright (c) 2018, Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
*/
#include <sys/cpu_uarray.h>
@@ -45,7 +45,8 @@ cpu_uarray_zalloc(size_t nr_items, int kmflags)
void
cpu_uarray_free(cpu_uarray_t *cua)
{
- kmem_free(cua, cpu_uarray_size(cua->cu_nr_items));
+ if (cua != NULL)
+ kmem_free(cua, cpu_uarray_size(cua->cu_nr_items));
}
uint64_t