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:
Xin LI 2006-07-14 13:58:32 +00:00
parent cf82f20057
commit 232e7000f5
2 changed files with 2 additions and 0 deletions

View File

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

View File

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