summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2005-03-23 16:23:19 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2005-03-23 16:23:19 +0000
commitcfa4b709d213a906bf950f27ebf352df7ca1ca0f (patch)
tree5dc7602a9313bb878d6518a3f5d4623b12fc22f7 /sys
parentda02d7f10cbe839e0f079554fd51e0c94b4056a7 (diff)
fix a possible kernel panic in the ar5211 and ar5212 detach functions.
closes PR #4153.
Diffstat (limited to 'sys')
-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