Print this page
12001 cpu_uarray_free(NULL) panics

*** 8,18 **** * source. A copy of the CDDL is also available via the Internet at * http://www.illumos.org/license/CDDL. */ /* ! * Copyright (c) 2018, Joyent, Inc. */ #include <sys/cpu_uarray.h> #include <sys/sysmacros.h> #include <sys/cpuvar.h> --- 8,18 ---- * source. A copy of the CDDL is also available via the Internet at * http://www.illumos.org/license/CDDL. */ /* ! * Copyright 2019 Joyent, Inc. */ #include <sys/cpu_uarray.h> #include <sys/sysmacros.h> #include <sys/cpuvar.h>
*** 43,52 **** --- 43,53 ---- } void cpu_uarray_free(cpu_uarray_t *cua) { + if (cua != NULL) kmem_free(cua, cpu_uarray_size(cua->cu_nr_items)); } uint64_t cpu_uarray_sum(cpu_uarray_t *cua, size_t index)