aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/temperature/tempget.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2011-01-16 01:52:45 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2011-01-16 01:52:45 +0000
commit1fdff41c5e6a4e7439714016f31cdacc77fe8a6e (patch)
treef63530f2d23a2d567dd3dca553e2d5d33588fc76 /src/modules/temperature/tempget.c
parentadd alloc check for calloc (diff)
downloadenlightenment-1fdff41c5e6a4e7439714016f31cdacc77fe8a6e.tar.gz
close file sooner so we don't leak fds
SVN revision: 56153
Diffstat (limited to 'src/modules/temperature/tempget.c')
-rw-r--r--src/modules/temperature/tempget.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/temperature/tempget.c b/src/modules/temperature/tempget.c
index d59851d0f..b98b6abdc 100644
--- a/src/modules/temperature/tempget.c
+++ b/src/modules/temperature/tempget.c
@@ -318,12 +318,12 @@ check(void)
if (f)
{
fgets(buf, sizeof(buf), f);
+ fclose(f);
buf[sizeof(buf) - 1] = 0;
if (sscanf(buf, "%i", &temp) == 1)
ret = 1;
else
goto error;
- fclose(f);
}
else
goto error;