Add missing mtx_destroy() on channel attach failure.

This commit is contained in:
Alexander Motin 2010-10-25 07:41:21 +00:00
parent 130a081563
commit 5b9392e840
2 changed files with 2 additions and 0 deletions

View File

@ -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);
}

View File

@ -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);
}