[libvirt] avoid double free