libnv: Use mallocarray(9) for the nv_calloc.
This commit is contained in:
parent
77e7601e6d
commit
7326b4e68c
@ -51,7 +51,7 @@ typedef struct nvpair nvpair_t;
|
||||
|
||||
#ifdef _KERNEL
|
||||
#define nv_malloc(size) malloc((size), M_NVLIST, M_WAITOK)
|
||||
#define nv_calloc(n, size) malloc((n) * (size), M_NVLIST, \
|
||||
#define nv_calloc(n, size) mallocarray((n), (size), M_NVLIST, \
|
||||
M_WAITOK | M_ZERO)
|
||||
#define nv_realloc(buf, size) realloc((buf), (size), M_NVLIST, \
|
||||
M_WAITOK)
|
||||
|
Loading…
x
Reference in New Issue
Block a user