While here also fix a very unlikely NULL pointer dereference. Submitted by: Shawn Webb <shawn.webb@hardenedbsd.org>