libadmin: Don't dereference NULL pointer in cmd