mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03: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,
|
||||
virCPUppc64Data *data)
|
||||
{
|
||||
virCPUDataPtr cpuData;
|
||||
g_autoptr(virCPUData) cpuData = NULL;
|
||||
|
||||
if (VIR_ALLOC(cpuData) < 0)
|
||||
return NULL;
|
||||
@ -407,9 +407,9 @@ ppc64MakeCPUData(virArch arch,
|
||||
cpuData->arch = arch;
|
||||
|
||||
if (ppc64DataCopy(&cpuData->data.ppc64, data) < 0)
|
||||
VIR_FREE(cpuData);
|
||||
return NULL;
|
||||
|
||||
return cpuData;
|
||||
return g_steal_pointer(&cpuData);
|
||||
}
|
||||
|
||||
static virCPUCompareResult
|
||||
|
Loading…
Reference in New Issue
Block a user