summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2015-01-26 23:30:13 +0100
committerAlexander Martinz <eviscerationls@gmail.com>2015-02-09 12:30:59 +0100
commit1a314551b969fe1ec6c42f0bd8e38495c45322b9 (patch)
treefe826fe89472077b0c6b19802b417f21c5474aa8
parent779a6421acb48ec4b85bcf3b7e27628b5ab92fba (diff)
macloader: Close file when we don't need it anymore.
Change-Id: Ib539b45ed45f1dcfc9eea0475adb9c50d17011b5 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--macloader/macloader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/macloader/macloader.c b/macloader/macloader.c
index a9c0d5b..b8275a5 100644
--- a/macloader/macloader.c
+++ b/macloader/macloader.c
@@ -60,6 +60,7 @@ int main() {
/* get and compare mac addr */
str = fgets(mac_addr_half, 9, file);
+ fclose(file);
if (str == 0) {
fprintf(stderr, "fgets() from file %s failed\n", MACADDR_PATH);
ALOGE("Can't read from %s\n", MACADDR_PATH);
@@ -203,6 +204,5 @@ int main() {
ALOGD("Deleting file %s\n", CID_PATH);
remove(CID_PATH);
}
- fclose(file);
return 0;
}