hyperv/vmbus: Destroy channel list lock upon attach failure and detach.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D7003
This commit is contained in:
sephe 2016-07-12 09:06:25 +00:00
parent 97adb9a66f
commit 056deab5df

View File

@ -1202,6 +1202,7 @@ vmbus_doattach(struct vmbus_softc *sc)
}
free(sc->vmbus_chmap, M_DEVBUF);
mtx_destroy(&sc->vmbus_scan_lock);
mtx_destroy(&sc->vmbus_chlist_lock);
return (ret);
}
@ -1283,6 +1284,8 @@ vmbus_detach(device_t dev)
free(sc->vmbus_chmap, M_DEVBUF);
mtx_destroy(&sc->vmbus_scan_lock);
mtx_destroy(&sc->vmbus_chlist_lock);
return (0);
}