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:
Robert Watson 2004-03-18 14:18:51 +00:00
parent f6fee71d57
commit 78592d56ef

View file

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