coverity: fix use before null check

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>