Drop Giant before returning in error path, thus eliminates
two mutex leaks. Submitted by: Beyond Luo <fedora ercist iscas ac cn> PR: kern/100046 Reviewed by: ken, scottl
This commit is contained in:
parent
cf82f20057
commit
232e7000f5
@ -591,6 +591,7 @@ cdsysctlinit(void *context, int pending)
|
||||
|
||||
if (softc->sysctl_tree == NULL) {
|
||||
printf("cdsysctlinit: unable to allocate sysctl tree\n");
|
||||
mtx_unlock(&Giant);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1001,6 +1001,7 @@ dasysctlinit(void *context, int pending)
|
||||
CTLFLAG_RD, 0, tmpstr);
|
||||
if (softc->sysctl_tree == NULL) {
|
||||
printf("dasysctlinit: unable to allocate sysctl tree\n");
|
||||
mtx_unlock(&Giant);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user