Merge pull request #4069 from bryongloden/patch-1
close opened file descriptors properly
This commit is contained in:
commit
d82acf1831
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user