diff options
-rw-r--r-- | libsensors/piranha_sensors.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libsensors/piranha_sensors.c b/libsensors/piranha_sensors.c index c40f793..b4c2814 100644 --- a/libsensors/piranha_sensors.c +++ b/libsensors/piranha_sensors.c @@ -251,7 +251,7 @@ void piranha_sensors_setup() { ALOGE("Failed to read " DEVICE_VARIANT_SYSFS ", assuming P51xx\n"); strcpy(device, "espresso10"); } - fclose(f); + if (f) fclose(f); ALOGD("Device: %s", device); |