From 5c49a68164eda28bf3f4bff84a38782068b7740e Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Wed, 26 Mar 2008 14:00:29 +0000 Subject: plug a mem leak. the array of ports wasnt freed on detach. --- sys/dev/ata/atascsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys') 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 @@ -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); -- cgit v1.2.3