We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e75610 commit c3111cdCopy full SHA for c3111cd
hwloc/topology-linux.c
@@ -5711,7 +5711,8 @@ hwloc_linuxfs_check_kernel_cmdline(struct hwloc_linux_backend_data_s *data)
5711
return;
5712
5713
cmdline[0] = 0;
5714
- fgets(cmdline, sizeof(cmdline), file);
+ if (!fgets(cmdline, sizeof(cmdline), file))
5715
+ goto out;
5716
5717
fakenuma = strstr(cmdline, "numa=fake=");
5718
if (fakenuma) {
@@ -5730,6 +5731,7 @@ hwloc_linuxfs_check_kernel_cmdline(struct hwloc_linux_backend_data_s *data)
5730
5731
hwloc_debug("Found fake numa %d\n", data->is_fake_numa_uniform);
5732
}
5733
5734
+ out:
5735
fclose(file);
5736
5737
0 commit comments