提交 e4e5a4d3 编写于 作者: J Ján Tomko 提交者: Cole Robinson

util: fix virBitmap allocation in virProcessInfoGetAffinity

Found by coverity:
Error: REVERSE_INULL (CWE-476):
    libvirt-0.10.2/src/util/processinfo.c:141: deref_ptr: Directly
    dereferencing pointer "map".
    libvirt-0.10.2/src/util/processinfo.c:142: check_after_deref:
    Null-checking "map" suggests that it may be null, but it has already
    been dereferenced on all paths leading to the check.
(cherry picked from commit 7730257d)
上级 2e7298d7
......@@ -139,7 +139,7 @@ realloc:
}
*map = virBitmapNew(maxcpu);
if (!map) {
if (!*map) {
virReportOOMError();
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册