libipmi open function causes python exception
When called more than once in a Python program ipmi_file_open function causes exception.
To reproduce:
ipmi_file_open
ipmi_file_close
ipmi_file_open -> exception
The solution is to remove
if (f)
fclose(f);
from ipmi_file_open function
int ipmi_file_open(const char *name)
{
if (f)
fclose(f);
f = fopen(name, "w");
if (!f)
return -1;
return 0;
}
This fix should be applied to common/fmceeprom/libipmi/ipmi.c in the master branch.