Coviery CID 1108: Avoid NULL pointer deref.
Coviery CID 1108: Avoid NULL pointer deref.

Coverity CID 1105: Avoid NULL deref.

From NetBSD

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars