[PATCH 4/8] bootstrap_read_devfs(): Close file after we are done with it
Andrey Smirnov
andrew.smirnov at gmail.com
Sun May 3 13:13:15 PDT 2015
Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
---
lib/bootstrap/devfs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/bootstrap/devfs.c b/lib/bootstrap/devfs.c
index de274a0..4176819 100644
--- a/lib/bootstrap/devfs.c
+++ b/lib/bootstrap/devfs.c
@@ -120,6 +120,8 @@ void* bootstrap_read_devfs(char *devname, bool use_bb, int offset,
}
ret = cdev_read(cdev, to, size, 0, 0);
+ cdev_close(cdev);
+
if (ret != size) {
bootstrap_err("%s: failed to read from %s\n", devname, partname);
return NULL;
--
2.1.4
More information about the barebox
mailing list