int major;
int minor;
int micro;
- char *package;
+ char *package = NULL;
if (!test)
return -1;
"Package %s was not ''", package);
goto cleanup;
}
+ VIR_FREE(package);
if (qemuMonitorGetVersion(qemuMonitorTestGetMonitor(test),
&major, &minor, µ,
cleanup:
qemuMonitorTestFree(test);
+ VIR_FREE(package);
return ret;
}
qemuMonitorTestPtr test = qemuMonitorTestNew(true, caps);
int ret = -1;
qemuMonitorMachineInfoPtr *info;
- int ninfo;
+ int ninfo = 0;
const char *null = NULL;
+ int i;
if (!test)
return -1;
cleanup:
qemuMonitorTestFree(test);
+ for (i = 0; i < ninfo; i++)
+ qemuMonitorMachineInfoFree(info[i]);
+ VIR_FREE(info);
+
return ret;
}
qemuMonitorTestPtr test = qemuMonitorTestNew(true, caps);
int ret = -1;
char **cpus = NULL;
- int ncpus;
+ int ncpus = 0;
+ int i;
if (!test)
return -1;
cleanup:
qemuMonitorTestFree(test);
+ for (i = 0; i < ncpus; i++)
+ VIR_FREE(cpus[i]);
+ VIR_FREE(cpus);
return ret;
}
qemuMonitorTestPtr test = qemuMonitorTestNew(true, caps);
int ret = -1;
char **commands = NULL;
- int ncommands;
+ int ncommands = 0;
+ int i;
if (!test)
return -1;
cleanup:
qemuMonitorTestFree(test);
+ for (i = 0; i < ncommands; i++)
+ VIR_FREE(commands[i]);
+ VIR_FREE(commands);
return ret;
}