[PATCH 1/7] qemu_capabilities.c: use g_autofree in virQEMUCapsLoadCache()

Ján Tomko jtomko at redhat.com
Thu Nov 18 14:25:37 UTC 2021


On a Thursday in 2021, Daniel Henrique Barboza wrote:
>Use autofree with 'str' and 'nodes' to get rid of the 'cleanup'
>label.
>

The reason this function is not yet completely converted to g_auto
is that we discourage mixing of manual and automatic freeing, which
is what happens here with both of these variables.

A combination of using separate variables and/or reducing the scope
of some of them by putting them into the loops where they're used
or separate functions will be needed to satisfy that requirement.

Jano

>Signed-off-by: Daniel Henrique Barboza <danielhb413 at gmail.com>
>---
> src/qemu/qemu_capabilities.c | 66 ++++++++++++++++--------------------
> 1 file changed, 30 insertions(+), 36 deletions(-)
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20211118/2bda2dca/attachment-0001.sig>


More information about the libvir-list mailing list