virt: Fix memory leak when using libvirt <= 1.0