mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
qemu: replace VIR_FREE with g_free in qemuFirmware*FreeContent()
These functions are all only called as a part of qemuFirmwareFree(), which frees the qemuFirmware object before return, so we can be sure none of the pointers is referenced after freeing (and thus there is no need to clear any of them). Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
e7942f65c9
commit
5fb0c789c3
@ -190,8 +190,8 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuFirmwareOSInterface, qemuFirmwareOSInterfaceFr
|
||||
static void
|
||||
qemuFirmwareFlashFileFreeContent(qemuFirmwareFlashFilePtr flash)
|
||||
{
|
||||
VIR_FREE(flash->filename);
|
||||
VIR_FREE(flash->format);
|
||||
g_free(flash->filename);
|
||||
g_free(flash->format);
|
||||
}
|
||||
|
||||
|
||||
@ -206,14 +206,14 @@ qemuFirmwareMappingFlashFreeContent(qemuFirmwareMappingFlashPtr flash)
|
||||
static void
|
||||
qemuFirmwareMappingKernelFreeContent(qemuFirmwareMappingKernelPtr kernel)
|
||||
{
|
||||
VIR_FREE(kernel->filename);
|
||||
g_free(kernel->filename);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
qemuFirmwareMappingMemoryFreeContent(qemuFirmwareMappingMemoryPtr memory)
|
||||
{
|
||||
VIR_FREE(memory->filename);
|
||||
g_free(memory->filename);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user