mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 20:01:16 +00:00
cpu_ppc64: Use g_auto* in ppc64MakeCPUData
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
9824a82198
commit
43250af8dd
@ -399,7 +399,7 @@ static virCPUDataPtr
|
|||||||
ppc64MakeCPUData(virArch arch,
|
ppc64MakeCPUData(virArch arch,
|
||||||
virCPUppc64Data *data)
|
virCPUppc64Data *data)
|
||||||
{
|
{
|
||||||
virCPUDataPtr cpuData;
|
g_autoptr(virCPUData) cpuData = NULL;
|
||||||
|
|
||||||
if (VIR_ALLOC(cpuData) < 0)
|
if (VIR_ALLOC(cpuData) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -407,9 +407,9 @@ ppc64MakeCPUData(virArch arch,
|
|||||||
cpuData->arch = arch;
|
cpuData->arch = arch;
|
||||||
|
|
||||||
if (ppc64DataCopy(&cpuData->data.ppc64, data) < 0)
|
if (ppc64DataCopy(&cpuData->data.ppc64, data) < 0)
|
||||||
VIR_FREE(cpuData);
|
return NULL;
|
||||||
|
|
||||||
return cpuData;
|
return g_steal_pointer(&cpuData);
|
||||||
}
|
}
|
||||||
|
|
||||||
static virCPUCompareResult
|
static virCPUCompareResult
|
||||||
|
Loading…
Reference in New Issue
Block a user