virt: Fix memory leak with libvirt MetadataXPath enabled