mirror of https://gitee.com/openkylin/libvirt.git
cpu_x86: Fix memory leak - virCPUx86GetHost
Commit 56b254dcc
called virCPUx86DataAdd, but returned -1 directly
without calling the virCPUx86DataFree.
Found by Coverity.
Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
0a5a547725
commit
5acb4eede2
|
@ -2791,7 +2791,7 @@ virCPUx86GetHost(virCPUDefPtr cpu,
|
|||
};
|
||||
|
||||
if (virCPUx86DataAdd(cpuData, &item) < 0)
|
||||
return -1;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue