From 7658a19cb6a6a60544d84b99d3b27125897297cc Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 22 Nov 2021 10:48:59 -0800 Subject: if_wg: wg_module_init: clean up more if the self tests fail Signed-off-by: John Baldwin --- src/if_wg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/if_wg.c b/src/if_wg.c index db93086..fffdf8d 100644 --- a/src/if_wg.c +++ b/src/if_wg.c @@ -3007,10 +3007,13 @@ wg_module_init(void) ret = ENOTRECOVERABLE; if (!wg_run_selftests()) - goto free_zone; + goto free_all; return (0); +free_all: + osd_jail_deregister(wg_osd_jail_slot); + cookie_deinit(); free_zone: uma_zdestroy(wg_packet_zone); free_none: -- cgit v1.2.3-59-g8ed1b