4d06af97d38c3648937eb8f732704379b3cd9e59 introduced a possible memory
leak of the memory allocated into the "cpu" pointer in
parallelsBuildCapabilities in the case "nodeGetInfo()" would fail right
after the allocation. Rearrange the code to avoid the possibility of the
leak.
Found by Coverity.
"parallels", NULL, NULL, 0, NULL) == NULL)
goto error;
- if (VIR_ALLOC(cpu) < 0)
+ if (nodeGetInfo(&nodeinfo))
goto error;
- if (nodeGetInfo(&nodeinfo))
+ if (VIR_ALLOC(cpu) < 0)
goto error;
cpu->arch = caps->host.arch;