diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-08-29 21:10:21 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-08-29 21:10:21 +0000 |
commit | 3fadb442fa9bbc345e4a5a7a90d30273baf95069 (patch) | |
tree | 73b337bb9aecfecf000373867b5f73c23a37f23e /sys/kern/uipc_usrreq.c | |
parent | 9da82e1fd89bd737f396aba53e9f1790a1e795f2 (diff) |
sizes for free(); ok guenther
Diffstat (limited to 'sys/kern/uipc_usrreq.c')
-rw-r--r-- | sys/kern/uipc_usrreq.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 3e5239225d1..ddc130fb4ed 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_usrreq.c,v 1.85 2015/08/28 04:38:47 guenther Exp $ */ +/* $OpenBSD: uipc_usrreq.c,v 1.86 2015/08/29 21:10:20 deraadt Exp $ */ /* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */ /* @@ -392,7 +392,7 @@ unp_detach(struct unpcb *unp) soisdisconnected(unp->unp_socket); unp->unp_socket->so_pcb = NULL; m_freem(unp->unp_addr); - free(unp, M_PCB, 0); + free(unp, M_PCB, sizeof *unp); if (unp_rights) task_add(systq, &unp_gc_task); } @@ -625,7 +625,7 @@ unp_drop(struct unpcb *unp, int errno) so->so_pcb = NULL; sofree(so); m_freem(unp->unp_addr); - free(unp, M_PCB, sizeof(*unp)); + free(unp, M_PCB, sizeof *unp); } } @@ -772,7 +772,7 @@ restart: out: fdpunlock(p->p_fd); if (fdp) - free(fdp, M_TEMP, 0); + free(fdp, M_TEMP, nfds * sizeof(int)); return (error); } |