mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-17 13:53:39 +00:00
Unlock g_gate_list_mtx mutex when we cannot allocate unit number.
MT5 candidate. PR: kern/72253 Submitted by: Ivan Voras <ivoras@fer.hr>
This commit is contained in:
parent
d5bd33eeac
commit
c7e17f4bbe
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136056
|
@ -412,6 +412,7 @@ g_gate_create(struct g_gate_ctl_create *ggio)
|
|||
mtx_lock(&g_gate_list_mtx);
|
||||
ggio->gctl_unit = g_gate_getunit(ggio->gctl_unit);
|
||||
if (ggio->gctl_unit == -1) {
|
||||
mtx_unlock(&g_gate_list_mtx);
|
||||
mtx_destroy(&sc->sc_inqueue_mtx);
|
||||
mtx_destroy(&sc->sc_outqueue_mtx);
|
||||
free(sc, M_GATE);
|
||||
|
|
Loading…
Reference in a new issue