Re: [PATCH 19/21] domain_conf.c: modernize virDomainDefControllersParse()

2020-12-01 Thread Michal Privoznik
On 11/24/20 8:20 PM, Daniel Henrique Barboza wrote: The 'error' label is just returning -1, so let's 'return -1' directly. Use g_autoptr() with virDomainControllerDefPtr to remove the need to call virDomainControllerDefFree() in the error path. There is no need to VIR_FREE(nodes) explictly sinc

[PATCH 19/21] domain_conf.c: modernize virDomainDefControllersParse()

2020-11-24 Thread Daniel Henrique Barboza
The 'error' label is just returning -1, so let's 'return -1' directly. Use g_autoptr() with virDomainControllerDefPtr to remove the need to call virDomainControllerDefFree() in the error path. There is no need to VIR_FREE(nodes) explictly since 'nodes' is using g_autofree. Signed-off-by: Daniel