summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorwkoszek <wkoszek@FreeBSD.org>2006-03-06 22:31:25 +0000
committerwkoszek <wkoszek@FreeBSD.org>2006-03-06 22:31:25 +0000
commit59f250987e816fa8236a29a184608c7ab7895673 (patch)
tree29bb25f4a223ab0b3719e5fa2da6bab9bdcf0d19 /tools
parented90ac4a12b05ea7180c8f2fc19b2ea3b9925e29 (diff)
downloadFreeBSD-src-59f250987e816fa8236a29a184608c7ab7895673.zip
FreeBSD-src-59f250987e816fa8236a29a184608c7ab7895673.tar.gz
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)
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/umastat/umastat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/tools/umastat/umastat.c b/tools/tools/umastat/umastat.c
index fb0cdde..626982c 100644
--- a/tools/tools/umastat/umastat.c
+++ b/tools/tools/umastat/umastat.c
@@ -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)
OpenPOWER on IntegriCloud