summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2005-03-23 16:23:18 +0000
committerreyk <reyk@openbsd.org>2005-03-23 16:23:18 +0000
commit8e16d2bc3665ab6f595345b78e285b88b2021796 (patch)
treeef642683694f9bdb7a186110ebde379ef3911b62
parentuse URAL_DEBUG not RAL_DEBUG. use logprintf for consistency. default to (diff)
downloadwireguard-openbsd-8e16d2bc3665ab6f595345b78e285b88b2021796.tar.xz
wireguard-openbsd-8e16d2bc3665ab6f595345b78e285b88b2021796.zip
fix a possible kernel panic in the ar5211 and ar5212 detach functions.
closes PR #4153.
-rw-r--r--sys/dev/ic/ar5211.c4
-rw-r--r--sys/dev/ic/ar5212.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ic/ar5211.c b/sys/dev/ic/ar5211.c
index 6d361e60226..ba8b4fd1291 100644
--- a/sys/dev/ic/ar5211.c
+++ b/sys/dev/ic/ar5211.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5211.c,v 1.6 2005/03/20 04:21:55 reyk Exp $ */
+/* $OpenBSD: ar5211.c,v 1.7 2005/03/23 16:23:18 reyk Exp $ */
/*
* Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net>
@@ -399,7 +399,7 @@ ar5k_ar5211_detach(hal)
struct ath_hal *hal;
{
if (hal->ah_rf_banks != NULL)
- free(hal, M_DEVBUF);
+ free(hal->ah_rf_banks, M_DEVBUF);
/*
* Free HAL structure, assume interrupts are down
diff --git a/sys/dev/ic/ar5212.c b/sys/dev/ic/ar5212.c
index 76f781e64f4..e7ed9a17b2d 100644
--- a/sys/dev/ic/ar5212.c
+++ b/sys/dev/ic/ar5212.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5212.c,v 1.10 2005/03/20 04:21:55 reyk Exp $ */
+/* $OpenBSD: ar5212.c,v 1.11 2005/03/23 16:23:18 reyk Exp $ */
/*
* Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net>
@@ -411,7 +411,7 @@ ar5k_ar5212_detach(hal)
struct ath_hal *hal;
{
if (hal->ah_rf_banks != NULL)
- free(hal, M_DEVBUF);
+ free(hal->ah_rf_banks, M_DEVBUF);
/*
* Free HAL structure, assume interrupts are down