diff options
author | Ziyan <jaraidaniel@gmail.com> | 2016-03-18 19:44:52 +0100 |
---|---|---|
committer | Andreas Blaesius <skate4life@gmx.de> | 2016-07-02 12:04:55 +0200 |
commit | 2f1f70a294dd196d1d092dbd80d0421bbbd2afaa (patch) | |
tree | f5042efa36aacd5ad862b3561708fbaaac0007b9 | |
parent | d8339b084d0049523eb93b4ee758766dc2e5a710 (diff) | |
download | device_samsung_espressowifi-2f1f70a294dd196d1d092dbd80d0421bbbd2afaa.zip device_samsung_espressowifi-2f1f70a294dd196d1d092dbd80d0421bbbd2afaa.tar.gz device_samsung_espressowifi-2f1f70a294dd196d1d092dbd80d0421bbbd2afaa.tar.bz2 |
libsensors: fix possible null pointer crash
Change-Id: Id58db179f673511c757856332262dec50cc8bd89
-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); |