/* Returns a short identifier for the various VM implementations */
int detect_vm(const char **id) {
+ _cleanup_free_ char *cpuinfo_contents = NULL;
+ int r;
#if defined(__i386__) || defined(__x86_64__)
const char *j, *k;
bool hypervisor;
_cleanup_free_ char *hvtype = NULL;
- _cleanup_free_ char *cpuinfo_contents = NULL;
- int r;
/* Try high-level hypervisor sysfs file first:
*