Merge pull request from bryongloden/patch-1

close opened file descriptors properly
This commit is contained in:
Maciek Chociej 2016-09-01 18:17:20 -04:00 committed by GitHub
commit d82acf1831

View File

@ -925,8 +925,10 @@ static int TryToReadNumaNode(const string &pci_bus_id, int device_ordinal) {
LOG(INFO) << "successful NUMA node read from SysFS had negative value ("
<< value << "), but there must be at least one NUMA node"
", so returning NUMA node zero";
fclose(file);
return 0;
}
fclose(file);
return value;
}
@ -934,6 +936,7 @@ static int TryToReadNumaNode(const string &pci_bus_id, int device_ordinal) {
<< "could not convert SysFS file contents to integral NUMA node value: "
<< content;
fclose(file);
return kUnknownNumaNode;
#endif
}