mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Correct a bug introduced with the recent clone API chang: when the clone
event handler for if_tap fails, make sure to clean up clone state to prevent a clone memory leak.
This commit is contained in:
parent
f6fee71d57
commit
78592d56ef
1 changed files with 1 additions and 0 deletions
|
|
@ -150,6 +150,7 @@ tapmodevent(mod, type, data)
|
|||
clone_setup(&tapclones);
|
||||
eh_tag = EVENTHANDLER_REGISTER(dev_clone, tapclone, 0, 1000);
|
||||
if (eh_tag == NULL) {
|
||||
clone_cleanup(&tapclones);
|
||||
mtx_destroy(&tapmtx);
|
||||
return (ENOMEM);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue