diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-07-13 15:00:41 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-07-13 15:00:41 +0000 |
commit | 72ed942a4e8dd2ddf0515863177b474617731fe9 (patch) | |
tree | c14149c76927fdfa4ea948e68a7853b90c0bf331 /sys/kern/sys_process.c | |
parent | af9b551b3f8f35d502a5b7e9555e37e9bab090b7 (diff) |
pass the size to free in some of the obvious cases
Diffstat (limited to 'sys/kern/sys_process.c')
-rw-r--r-- | sys/kern/sys_process.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 53d7efec5ad..4bd359710e3 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_process.c,v 1.63 2014/07/12 18:43:32 tedu Exp $ */ +/* $OpenBSD: sys_process.c,v 1.64 2014/07/13 15:00:40 tedu Exp $ */ /* $NetBSD: sys_process.c,v 1.55 1996/05/15 06:17:47 tls Exp $ */ /*- @@ -581,7 +581,7 @@ sys_ptrace(struct proc *p, void *v, register_t *retval) if (error == 0) { error = process_write_regs(t, regs); } - free(regs, M_TEMP, 0); + free(regs, M_TEMP, sizeof(*regs)); return (error); case PT_GETREGS: KASSERT((p->p_flag & P_SYSTEM) == 0); @@ -593,7 +593,7 @@ sys_ptrace(struct proc *p, void *v, register_t *retval) if (error == 0) error = copyout(regs, SCARG(uap, addr), sizeof (*regs)); - free(regs, M_TEMP, 0); + free(regs, M_TEMP, sizeof(*regs)); return (error); #ifdef PT_SETFPREGS case PT_SETFPREGS: @@ -606,7 +606,7 @@ sys_ptrace(struct proc *p, void *v, register_t *retval) if (error == 0) { error = process_write_fpregs(t, fpregs); } - free(fpregs, M_TEMP, 0); + free(fpregs, M_TEMP, sizeof(*fpregs)); return (error); #endif #ifdef PT_GETFPREGS @@ -620,7 +620,7 @@ sys_ptrace(struct proc *p, void *v, register_t *retval) if (error == 0) error = copyout(fpregs, SCARG(uap, addr), sizeof(*fpregs)); - free(fpregs, M_TEMP, 0); + free(fpregs, M_TEMP, sizeof(*fpregs)); return (error); #endif #ifdef PT_SETXMMREGS @@ -634,7 +634,7 @@ sys_ptrace(struct proc *p, void *v, register_t *retval) if (error == 0) { error = process_write_xmmregs(t, xmmregs); } - free(xmmregs, M_TEMP, 0); + free(xmmregs, M_TEMP, sizeof(*xmmregs)); return (error); #endif #ifdef PT_GETXMMREGS @@ -648,7 +648,7 @@ sys_ptrace(struct proc *p, void *v, register_t *retval) if (error == 0) error = copyout(xmmregs, SCARG(uap, addr), sizeof(*xmmregs)); - free(xmmregs, M_TEMP, 0); + free(xmmregs, M_TEMP, sizeof(*xmmregs)); return (error); #endif #ifdef PT_WCOOKIE |