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.
This commit is contained in:
Ján Tomko 2012-11-29 10:56:56 +01:00 committed by Eric Blake
parent d5e8842538
commit 7730257db3

View File

@ -140,7 +140,7 @@ realloc:
}
*map = virBitmapNew(maxcpu);
if (!map) {
if (!*map) {
virReportOOMError();
return -1;
}