libnv: Use mallocarray(9) for the nv_calloc.
This commit is contained in:
parent
77e7601e6d
commit
7326b4e68c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=328164
@ -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…
Reference in New Issue
Block a user