summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjca <jca@openbsd.org>2016-03-15 18:04:57 +0000
committerjca <jca@openbsd.org>2016-03-15 18:04:57 +0000
commit823dbc36580b00b865785ee8794cbdbb36cce800 (patch)
treef393bee95d4e8a41b6893df81648faa3c4610852
parentEthernet drivers no longer need to include if_vlan_var.h for the VLAN (diff)
downloadwireguard-openbsd-823dbc36580b00b865785ee8794cbdbb36cce800.tar.xz
wireguard-openbsd-823dbc36580b00b865785ee8794cbdbb36cce800.zip
Fix size passed to free(), found the hard way by Nick Permyakov
ok deraadt@
-rw-r--r--sys/dev/ata/atascsi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c
index 37330f4fbf1..04995c4567b 100644
--- a/sys/dev/ata/atascsi.c
+++ b/sys/dev/ata/atascsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atascsi.c,v 1.127 2016/01/03 21:07:46 kettenis Exp $ */
+/* $OpenBSD: atascsi.c,v 1.128 2016/03/15 18:04:57 jca Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -491,7 +491,7 @@ atascsi_free(struct scsi_link *link)
* free ahp itself. this relies on the order luns are
* detached in scsi_detach_target().
*/
- free(ahp, M_DEVBUF, sizeof(*ap));
+ free(ahp, M_DEVBUF, sizeof(*ahp));
as->as_host_ports[port] = NULL;
}
}