diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-08-28 00:03:55 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-08-28 00:03:55 +0000 |
commit | 5ad0e8c0aeab06cc8ce3a15ee37adfe7cc17c615 (patch) | |
tree | 4c6488a821b9d519bda84a6732552a136bbdbd76 /sys/kern/kern_bufq.c | |
parent | 345b5260c0d266903c3e0fe179df2a1d3c10a5dc (diff) |
fairly simple sizes for free(); ok tedu
Diffstat (limited to 'sys/kern/kern_bufq.c')
-rw-r--r-- | sys/kern/kern_bufq.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/kern/kern_bufq.c b/sys/kern/kern_bufq.c index d819783f268..7ed83470e58 100644 --- a/sys/kern/kern_bufq.c +++ b/sys/kern/kern_bufq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_bufq.c,v 1.30 2015/03/14 03:38:50 jsg Exp $ */ +/* $OpenBSD: kern_bufq.c,v 1.31 2015/08/28 00:03:53 deraadt Exp $ */ /* * Copyright (c) 2010 Thordur I. Bjornsson <thib@openbsd.org> * Copyright (c) 2010 David Gwynne <dlg@openbsd.org> @@ -328,7 +328,9 @@ bufq_fifo_create(void) void bufq_fifo_destroy(void *data) { - free(data, M_DEVBUF, 0); + struct bufq_fifo_head *head = data; + + free(head, M_DEVBUF, sizeof(*head)); } void @@ -445,7 +447,9 @@ bufq_nscan_create(void) void bufq_nscan_destroy(void *vdata) { - free(vdata, M_DEVBUF, 0); + struct bufq_nscan_data *data = vdata; + + free(data, M_DEVBUF, sizeof(*data)); } void |