[libvirt] [PATCH 11/15] Avoid unnecessary copying and calling virResetLastError.