diff options
author | 2015-10-19 06:56:58 +0000 | |
---|---|---|
committer | 2015-10-19 06:56:58 +0000 | |
commit | d0175656520e34e390871101685dc9ee5b7e6940 (patch) | |
tree | 5f502f25f1d95a4366e95d25bc55d848e8ff6e52 | |
parent | Move bge rxeof and txeof outside the kernel lock. (diff) | |
download | wireguard-openbsd-d0175656520e34e390871101685dc9ee5b7e6940.tar.xz wireguard-openbsd-d0175656520e34e390871101685dc9ee5b7e6940.zip |
Can't assert "module->fd >= 0" in radiusd_stop() since the module may
be closed already when error.
-rw-r--r-- | usr.sbin/radiusd/radiusd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/radiusd/radiusd.c b/usr.sbin/radiusd/radiusd.c index 72dd39a8046..dd8b7785dd0 100644 --- a/usr.sbin/radiusd/radiusd.c +++ b/usr.sbin/radiusd/radiusd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radiusd.c,v 1.7 2015/08/25 01:12:59 yasuoka Exp $ */ +/* $OpenBSD: radiusd.c,v 1.8 2015/10/19 06:56:58 yasuoka Exp $ */ /* * Copyright (c) 2013 Internet Initiative Japan Inc. @@ -1050,8 +1050,6 @@ on_fail: void radiusd_module_stop(struct radiusd_module *module) { - RADIUSD_ASSERT(module->fd >= 0); - module->stopped = true; if (module->secret != NULL) @@ -1059,9 +1057,11 @@ radiusd_module_stop(struct radiusd_module *module) free(module->secret); module->secret = NULL; - imsg_compose(&module->ibuf, IMSG_RADIUSD_MODULE_STOP, 0, 0, -1, - NULL, 0); - radiusd_module_reset_ev_handler(module); + if (module->fd >= 0) { + imsg_compose(&module->ibuf, IMSG_RADIUSD_MODULE_STOP, 0, 0, -1, + NULL, 0); + radiusd_module_reset_ev_handler(module); + } } static void |