diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-09-06 16:47:49 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-09-06 16:47:49 +0000 |
commit | 92946d81a6a1d7d9cf3ba0fe9c2a5e9f6af60472 (patch) | |
tree | 2d04f1d53c2904b014ede9a65a6d88008fbb06ec /sys/dev/acpi/acpi.c | |
parent | 0f40754afb0b1f9681e5cec1354bb64af0bdf020 (diff) |
clarify malloc arguments (base + length...)
Diffstat (limited to 'sys/dev/acpi/acpi.c')
-rw-r--r-- | sys/dev/acpi/acpi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index f451f9ef782..4bb5d543aec 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.293 2015/08/28 00:03:53 deraadt Exp $ */ +/* $OpenBSD: acpi.c,v 1.294 2015/09/06 16:47:48 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -1187,7 +1187,7 @@ acpi_maptable(struct acpi_softc *sc, paddr_t addr, const char *sig, } /* Allocate copy */ - entry = malloc(len + sizeof(*entry), M_DEVBUF, M_NOWAIT); + entry = malloc(sizeof(*entry) + len, M_DEVBUF, M_NOWAIT); if (entry != NULL) { memcpy(entry->q_data, handle.va, len); entry->q_table = entry->q_data; |