m3 and g2: bugfix to close fd in server after reading detector type

This commit is contained in:
maliakal_d 2020-10-27 18:16:42 +01:00
parent 23d9d5fa81
commit 453908c7cb
2 changed files with 2 additions and 0 deletions

View File

@ -1766,6 +1766,7 @@ int checkDetectorType() {
char buffer[MAX_STR_LENGTH];
memset(buffer, 0, sizeof(buffer));
fread(buffer, MAX_STR_LENGTH, sizeof(char), fd);
fclose(fd);
if (strlen(buffer) == 0) {
LOG(logERROR,
("Could not read file %s to get type of the module attached\n",

View File

@ -1976,6 +1976,7 @@ int checkDetectorType() {
char buffer[MAX_STR_LENGTH];
memset(buffer, 0, sizeof(buffer));
fread(buffer, MAX_STR_LENGTH, sizeof(char), fd);
fclose(fd);
if (strlen(buffer) == 0) {
LOG(logERROR,
("Could not read file %s to get type of the module attached\n",