Add missing mtx_destroy() on channel attach failure.

This commit is contained in:
mav 2010-10-25 07:41:21 +00:00
parent dbb2753aa1
commit 00e9a82e78
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);
}