mirror of
https://github.com/opnsense/src.git
synced 2026-07-16 12:33:07 -04:00
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
2 changed files with 2 additions and 0 deletions
|
|
@ -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…
Reference in a new issue