summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2015-05-06 12:32:09 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2015-05-07 09:49:41 +0200
commitd26ed41facc4c18d33730ad935531aebc0d1fa71 (patch)
tree8519349f0772ca6c9ac087e4208019dffa2f1f16 /lib
parenta11d0e04c831f6af0c36b3137d304b538bc86654 (diff)
downloadbarebox-d26ed41facc4c18d33730ad935531aebc0d1fa71.tar.gz
barebox-d26ed41facc4c18d33730ad935531aebc0d1fa71.tar.xz
bootstrap_read_devfs(): Close file after we are done with it
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/bootstrap/devfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bootstrap/devfs.c b/lib/bootstrap/devfs.c
index 0c47cd27cf..5693431a9b 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;