mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
wg: fix MOD_LOAD to fail properly if cookie_init() fails
Previously we'd jump to the `free_crypto` label, but never set `ret` to a failure value -- it would retain success from the call just prior. Set ret up properly. This is part of D40708, but not the main point of the change.
This commit is contained in:
parent
c3e58ace31
commit
ad9f4e6351
1 changed files with 2 additions and 1 deletions
|
|
@ -2996,7 +2996,8 @@ wg_module_init(void)
|
|||
ret = crypto_init();
|
||||
if (ret != 0)
|
||||
goto free_zone;
|
||||
if (cookie_init() != 0)
|
||||
ret = cookie_init();
|
||||
if (ret != 0)
|
||||
goto free_crypto;
|
||||
|
||||
wg_osd_jail_slot = osd_jail_register(NULL, methods);
|
||||
|
|
|
|||
Loading…
Reference in a new issue