提交 fc313364 编写于 作者: C Chen Fan 提交者: Martin Kletzander

virnuma: add nodeset NULL check in virNumaSetupMemoryPolicy

Introduced by commit c63ef045, when nodeset is NULL, validation will
pass in virNumaSetupMemoryPolicy, but virBitmapNextSetBit must ensure
bitmap is not NULL, otherwise that might cause a segmentation fault.
This patch fixes it.
Signed-off-by: NChen Fan <chen.fan.fnst@cn.fujitsu.com>
上级 6cc98551
......@@ -97,6 +97,9 @@ virNumaSetupMemoryPolicy(virDomainNumatuneMemMode mode,
size_t i;
int maxnode = 0;
if (!nodeset)
return 0;
if (!virNumaNodesetIsAvailable(nodeset))
return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册