summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-09-02 04:45:21 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-09-02 04:45:21 +0000
commitf26b6e57f3c34b8daec9495460662af507c0f5fb (patch)
tree7c77177f36e2b1e3c05d88a480562b82efa84141 /sys
parent6a676413fc304bce4fe45d91cbed0edfa230e28d (diff)
Invoke malloc() with the correct sizeof value in acpipwrres_foundcons().
This was harmless but eating too much memory. ok pirofti@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/acpi/acpipwrres.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpipwrres.c b/sys/dev/acpi/acpipwrres.c
index 5f71cb9f20d..eeb02c84090 100644
--- a/sys/dev/acpi/acpipwrres.c
+++ b/sys/dev/acpi/acpipwrres.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpipwrres.c,v 1.1 2009/06/03 07:13:48 pirofti Exp $ */
+/* $OpenBSD: acpipwrres.c,v 1.2 2009/09/02 04:45:20 miod Exp $ */
/*
* Copyright (c) 2009 Paul Irofti <pirofti@openbsd.org>
*
@@ -198,7 +198,7 @@ acpipwrres_foundcons(struct aml_node *node, void *arg)
res.v_package[i]->v_string);
if (pnode == sc->sc_devnode) {
DPRINTF(("%s: consumer match\n", DEVNAME(sc)));
- cons = malloc(sizeof *pnode, M_DEVBUF,
+ cons = malloc(sizeof *cons, M_DEVBUF,
M_WAITOK | M_ZERO);
cons->cs_node = pnode;
TAILQ_INSERT_HEAD(&sc->sc_cons, cons, cs_link);