diff options
author | 2015-08-29 05:40:01 +0000 | |
---|---|---|
committer | 2015-08-29 05:40:01 +0000 | |
commit | c4deb1d23e5260b9d5b7e20251d2163a2a267346 (patch) | |
tree | 552a53441e911cdbd0a40287678206ffe3d7e028 /sys/kern/exec_subr.c | |
parent | _NLIST_DO_ELF is no longer needed: it's the only option (diff) | |
download | wireguard-openbsd-c4deb1d23e5260b9d5b7e20251d2163a2a267346.tar.xz wireguard-openbsd-c4deb1d23e5260b9d5b7e20251d2163a2a267346.zip |
size for free()
Diffstat (limited to 'sys/kern/exec_subr.c')
-rw-r--r-- | sys/kern/exec_subr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/exec_subr.c b/sys/kern/exec_subr.c index e2c59a1424c..de1c5fb18cc 100644 --- a/sys/kern/exec_subr.c +++ b/sys/kern/exec_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_subr.c,v 1.50 2015/03/14 03:38:50 jsg Exp $ */ +/* $OpenBSD: exec_subr.c,v 1.51 2015/08/29 05:40:01 deraadt Exp $ */ /* $NetBSD: exec_subr.c,v 1.9 1994/12/04 03:10:42 mycroft Exp $ */ /* @@ -115,7 +115,8 @@ kill_vmcmds(struct exec_vmcmd_set *evsp) */ evsp->evs_used = 0; if (evsp->evs_cmds != evsp->evs_start) - free(evsp->evs_cmds, M_EXEC, 0); + free(evsp->evs_cmds, M_EXEC, + evsp->evs_cnt * sizeof(struct exec_vmcmd)); evsp->evs_cmds = evsp->evs_start; evsp->evs_cnt = EXEC_DEFAULT_VMCMD_SETSIZE; } |