since we have allocated sufficient memory to *data, we can safely tear down LibVMI here, though this actually can be omitted.
vmi_destroy(vmi);