summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2008-11-30 18:22:16 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2008-11-30 18:22:16 +0000
commitfc7674ba10f295fb50106922cd87a22ac0b1555c (patch)
treefb2901f8a404c48a02c0b85624614588e1fc5351 /sys
parent1192e83125f9c5de3f52ef79bc11c5a137936ffd (diff)
clarify allocation
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/uipc_mbuf2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/uipc_mbuf2.c b/sys/kern/uipc_mbuf2.c
index 9a7117553f5..60d3182fc7c 100644
--- a/sys/kern/uipc_mbuf2.c
+++ b/sys/kern/uipc_mbuf2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_mbuf2.c,v 1.28 2007/03/17 09:26:35 art Exp $ */
+/* $OpenBSD: uipc_mbuf2.c,v 1.29 2008/11/30 18:22:15 deraadt Exp $ */
/* $KAME: uipc_mbuf2.c,v 1.29 2001/02/14 13:42:10 itojun Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.40 1999/04/01 00:23:25 thorpej Exp $ */
@@ -263,7 +263,7 @@ m_tag_get(int type, int len, int wait)
if (len < 0)
return (NULL);
- t = malloc(len + sizeof(struct m_tag), M_PACKET_TAGS, wait);
+ t = malloc(sizeof(struct m_tag) + len, M_PACKET_TAGS, wait);
if (t == NULL)
return (NULL);
t->m_tag_id = type;