From 00e9a82e783baffc8d3c982f7f3aa0408cf2adfb Mon Sep 17 00:00:00 2001 From: mav Date: Mon, 25 Oct 2010 07:41:21 +0000 Subject: Add missing mtx_destroy() on channel attach failure. --- sys/dev/ahci/ahci.c | 1 + sys/dev/siis/siis.c | 1 + 2 files changed, 2 insertions(+) (limited to 'sys') diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index d6357b2..314bd91 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -969,6 +969,7 @@ err1: err0: bus_release_resource(dev, SYS_RES_MEMORY, ch->unit, ch->r_mem); mtx_unlock(&ch->mtx); + mtx_destroy(&ch->mtx); return (error); } diff --git a/sys/dev/siis/siis.c b/sys/dev/siis/siis.c index 0aef775..ba10c92 100644 --- a/sys/dev/siis/siis.c +++ b/sys/dev/siis/siis.c @@ -527,6 +527,7 @@ err1: err0: bus_release_resource(dev, SYS_RES_MEMORY, ch->unit, ch->r_mem); mtx_unlock(&ch->mtx); + mtx_destroy(&ch->mtx); return (error); } -- cgit v1.1