diff --git a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c index 168d766b5..99002cb46 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c @@ -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", diff --git a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c index 0e89c7811..62a6d6a7c 100644 --- a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c @@ -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",