lscpu: make /proc/sysinfo usage more robust [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
e36aad2139
commit
b3eff5dd74
|
@ -551,6 +551,8 @@ read_hypervisor(struct lscpu_desc *desc, struct lscpu_modifier *mod)
|
|||
FILE *fd = path_fopen("r", 0, _PATH_PROC_SYSINFO);
|
||||
char buf[BUFSIZ];
|
||||
|
||||
if (!fd)
|
||||
return;
|
||||
desc->hyper = HYPER_IBM;
|
||||
desc->hypervisor = "PR/SM";
|
||||
desc->virtype = VIRT_FULL;
|
||||
|
|
Loading…
Reference in New Issue