--- a/thermferm/devices.c Thu Jul 31 23:57:04 2014 +0200 +++ b/thermferm/devices.c Fri Aug 01 09:25:38 2014 +0200 @@ -116,6 +116,7 @@ } } } + closedir(fd); } #ifdef HAVE_WIRINGPI_H @@ -250,6 +251,7 @@ syslog(LOG_NOTICE, "sensor %s CRC error", device->address); device->present = DEVPRESENT_ERROR; } + fclose(fp); } else { if (device->present != DEVPRESENT_NO) { syslog(LOG_NOTICE, "sensor %s is missing", device->address);