]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: pass pointers instead of copying objects for qemuFirmware*FreeContent()
authorLaine Stump <laine@redhat.com>
Wed, 3 Feb 2021 21:57:57 +0000 (16:57 -0500)
committerLaine Stump <laine@redhat.com>
Fri, 5 Feb 2021 05:21:54 +0000 (00:21 -0500)
commite7942f65c95f4d339e8d42dcd5df30ffc0d0837c
treee544159915be3f1b626e5d3a31440586d5d172d5
parente1b02e3a56eba1377790dd344115439834a3e939
qemu: pass pointers instead of copying objects for qemuFirmware*FreeContent()

These functions all cooperate to free memory pointed to by a single
object that contains (doesn't *point to*, but actually contains)
several sub-objects. They were written to send copies of these
sub-objects to subordinate functions, rather than just sending
pointers to the sub-objects.

Let's change these functions to just send pointers to the objects
they're cleaning out rather than all the wasteful and pointless
copying.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/qemu/qemu_firmware.c