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:
+2
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user