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 since 'nodes'
is using g_autofree.

Signed-off-by: Daniel Henrique Barboza <danielhb...@gmail.com>
---
  src/conf/domain_conf.c | 26 ++++++++++----------------
  1 file changed, 10 insertions(+), 16 deletions(-)

Reviewed-by: Michal Privoznik <mpriv...@redhat.com>

Michal

Reply via email to