summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2008-03-26 14:00:29 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2008-03-26 14:00:29 +0000
commit5c49a68164eda28bf3f4bff84a38782068b7740e (patch)
tree1fe77e32cb4fc56ad6402ef3c3ddf8311674fa72
parent07723d61eef944baca4ee9815c16bb3a8b75614e (diff)
plug a mem leak. the array of ports wasnt freed on detach.
-rw-r--r--sys/dev/ata/atascsi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c
index 4c6fe70446a..c8a1ec53b36 100644
--- a/sys/dev/ata/atascsi.c
+++ b/sys/dev/ata/atascsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atascsi.c,v 1.60 2007/12/30 13:02:53 dlg Exp $ */
+/* $OpenBSD: atascsi.c,v 1.61 2008/03/26 14:00:28 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -142,6 +142,7 @@ atascsi_detach(struct atascsi *as, int flags)
if (rv != 0)
return (rv);
+ free(as->as_ports, M_DEVBUF);
free(as, M_DEVBUF);
return (0);