[PATCH v3 14/18] bootstrap_read_devfs(): Close file after we are done with it
Andrey Smirnov
andrew.smirnov at gmail.com
Wed May 6 12:32:09 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 0c47cd2..5693431 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