daemon: fix one more potential NULL deref