mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
tests: use g_auto for virCPUDataFree
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
parent
24b5739682
commit
0047bb18bc
@ -2158,7 +2158,7 @@ static int
|
|||||||
testQemuMonitorJSONGetCPUData(const void *opaque)
|
testQemuMonitorJSONGetCPUData(const void *opaque)
|
||||||
{
|
{
|
||||||
const struct testCPUData *data = opaque;
|
const struct testCPUData *data = opaque;
|
||||||
virCPUData *cpuData = NULL;
|
g_autoptr(virCPUData) cpuData = NULL;
|
||||||
g_autofree char *jsonFile = NULL;
|
g_autofree char *jsonFile = NULL;
|
||||||
g_autofree char *dataFile = NULL;
|
g_autofree char *dataFile = NULL;
|
||||||
g_autofree char *jsonStr = NULL;
|
g_autofree char *jsonStr = NULL;
|
||||||
@ -2208,7 +2208,6 @@ testQemuMonitorJSONGetCPUData(const void *opaque)
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
virCPUDataFree(cpuData);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2217,7 +2216,7 @@ testQemuMonitorJSONGetNonExistingCPUData(const void *opaque)
|
|||||||
{
|
{
|
||||||
const testGenericData *data = opaque;
|
const testGenericData *data = opaque;
|
||||||
virDomainXMLOption *xmlopt = data->xmlopt;
|
virDomainXMLOption *xmlopt = data->xmlopt;
|
||||||
virCPUData *cpuData = NULL;
|
g_autoptr(virCPUData) cpuData = NULL;
|
||||||
int rv, ret = -1;
|
int rv, ret = -1;
|
||||||
g_autoptr(qemuMonitorTest) test = NULL;
|
g_autoptr(qemuMonitorTest) test = NULL;
|
||||||
|
|
||||||
@ -2251,7 +2250,6 @@ testQemuMonitorJSONGetNonExistingCPUData(const void *opaque)
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
cleanup:
|
cleanup:
|
||||||
virCPUDataFree(cpuData);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user