提交 5acb4eed 编写于 作者: J John Ferlan

cpu_x86: Fix memory leak - virCPUx86GetHost

Commit 56b254dc called virCPUx86DataAdd, but returned -1 directly
without calling the virCPUx86DataFree.

Found by Coverity.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 0a5a5477
...@@ -2791,7 +2791,7 @@ virCPUx86GetHost(virCPUDefPtr cpu, ...@@ -2791,7 +2791,7 @@ virCPUx86GetHost(virCPUDefPtr cpu,
}; };
if (virCPUx86DataAdd(cpuData, &item) < 0) if (virCPUx86DataAdd(cpuData, &item) < 0)
return -1; goto cleanup;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册