diff options
author | 2014-07-13 23:10:23 +0000 | |
---|---|---|
committer | 2014-07-13 23:10:23 +0000 | |
commit | 9f6fb5c7f4fbd91f055bd858e78f5b372765ef8e (patch) | |
tree | c9a5c91f733f6bf4c568dc8afebb572c7a07312b /sys/dev/systrace.c | |
parent | Split the context allocation out from the configuration. This will allow (diff) | |
download | wireguard-openbsd-9f6fb5c7f4fbd91f055bd858e78f5b372765ef8e.tar.xz wireguard-openbsd-9f6fb5c7f4fbd91f055bd858e78f5b372765ef8e.zip |
Some reallocarray() use; review Jean-Philippe Ouellet, patrick keshishian
ok tedu
Diffstat (limited to 'sys/dev/systrace.c')
-rw-r--r-- | sys/dev/systrace.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/systrace.c b/sys/dev/systrace.c index 67f83d9fc26..ade4097bed0 100644 --- a/sys/dev/systrace.c +++ b/sys/dev/systrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: systrace.c,v 1.70 2014/07/12 18:48:51 tedu Exp $ */ +/* $OpenBSD: systrace.c,v 1.71 2014/07/13 23:10:23 deraadt Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * All rights reserved. @@ -1639,8 +1639,7 @@ systrace_newpolicy(struct fsystrace *fst, int maxents) DPRINTF(("%s: allocating %d -> %lu\n", __func__, maxents, (u_long)maxents * sizeof(int))); - pol->sysent = (u_char *)malloc(maxents * sizeof(u_char), - M_XDATA, M_WAITOK); + pol->sysent = malloc(maxents, M_XDATA, M_WAITOK); pol->nsysent = maxents; for (i = 0; i < maxents; i++) pol->sysent[i] = SYSTR_POLICY_ASK; |