]> xenbits.xensource.com Git - libvirt.git/commitdiff
cpu: Properly define g_autoptr for virCPUData
authorJiri Denemark <jdenemar@redhat.com>
Thu, 14 May 2020 08:36:22 +0000 (10:36 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 15 May 2020 09:13:31 +0000 (11:13 +0200)
The structure is not specific to x86 and thus its cleanup function
should be defined in cpu.h and be available to all users.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/cpu/cpu.h
src/cpu/cpu_x86.c

index f779d2be176e10feca3e2442d44d91a59913d729..1d7900a829226d8176772d8e5be03eaaa77fc804 100644 (file)
@@ -182,6 +182,7 @@ virCPUDataNew(virArch arch);
 
 void
 virCPUDataFree(virCPUDataPtr data);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(virCPUData, virCPUDataFree);
 
 bool
 virCPUGetHostIsSupported(virArch arch);
index 9183259bce6a4127362a45dd7c27a14d29da4033..e3c553e943c9417866a938bdb0909834a73fb825 100644 (file)
@@ -495,7 +495,6 @@ virCPUx86DataFree(virCPUDataPtr data)
     virCPUx86DataClear(&data->data.x86);
     VIR_FREE(data);
 }
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(virCPUData, virCPUx86DataFree);
 
 
 static void