mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Allocate proper amount of memory. Otherwise, we pass the end of a buffer,
thus having unpleasant warning. Was found by jemalloc redzone code. Reviewed by: rwatson Approved by: cognet (mentor)
This commit is contained in:
parent
858494e461
commit
283e3098bb
1 changed files with 1 additions and 1 deletions
|
|
@ -326,7 +326,7 @@ main(int argc, char *argv[])
|
|||
* it is statically declared as an array of size 1, so we need to
|
||||
* provide additional space.
|
||||
*/
|
||||
uzp_userspace_len = sizeof(struct uma_zone) + (mp_maxid - 1) *
|
||||
uzp_userspace_len = sizeof(struct uma_zone) + mp_maxid *
|
||||
sizeof(struct uma_cache);
|
||||
uzp_userspace = malloc(uzp_userspace_len);
|
||||
if (uzp_userspace == NULL)
|
||||
|
|
|
|||
Loading…
Reference in a new issue