[libvirt] [PATCH] Fix mistakes in checking return values