Fix segmentation fault on radiusd(8) when exiting.
authormestre <mestre@openbsd.org>
Wed, 1 Aug 2018 17:17:42 +0000 (17:17 +0000)
committermestre <mestre@openbsd.org>
Wed, 1 Aug 2018 17:17:42 +0000 (17:17 +0000)
commitfda17215ec9c0adb23d4fc9c243464325b9e9d52
treeed369e0c4735a59a49f511dff5247dd2c30993f0
parent89db6ba1858a3f1fa9ced864bcd58b3c35580929
Fix segmentation fault on radiusd(8) when exiting.
If one of the configured modules doesn't have a secret setup then
module->secret == NULL which would call strlen(NULL), within freezero(3),
and that shouldn't happen, but in this case since the call is done it
segfaults and the daemon is not properly shutdown.

cluebat stick provided by semarie@, OK tb@ and deraadt@
usr.sbin/radiusd/radiusd.c