[libvirt] [PATCH v2 6/8] util: Create common error path for invalid object