projects
/
GitHub
/
LineageOS
/
android_hardware_samsung.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64fb94f
)
macloader: Close file when we don't need it anymore.
author
Andreas Schneider
<asn@cryptomilk.org>
Mon, 26 Jan 2015 22:30:13 +0000
(23:30 +0100)
committer
Andreas Schneider
<asn@cryptomilk.org>
Tue, 27 Jan 2015 08:05:58 +0000
(09:05 +0100)
Change-Id: Ib539b45ed45f1dcfc9eea0475adb9c50d17011b5
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
macloader/macloader.c
patch
|
blob
|
blame
|
history
diff --git
a/macloader/macloader.c
b/macloader/macloader.c
index 1ca1cba9ddb9693b5bb03bd3cf54ff69c9953740..c7aa7139098e3f29928f46104910c16e62d43634 100644
(file)
--- a/
macloader/macloader.c
+++ b/
macloader/macloader.c
@@
-59,6
+59,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);
@@
-186,6
+187,5
@@
int main() {
ALOGD("Deleting file %s\n", CID_PATH);
remove(CID_PATH);
}
- fclose(file);
return 0;
}