commit | bfdcc40bffa755b953b73a42cc72b802d0178afb | [log] [tgz] |
---|---|---|
author | Tomasz Kondel <tomasz.kondel2@sonymobile.com> | Thu Feb 06 08:57:27 2014 +0100 |
committer | JP Abgrall <jpa@google.com> | Thu Nov 13 18:20:55 2014 +0000 |
tree | 56a17b0bd0585df272d20682a8c8a07d5c02fd7c | |
parent | ca1797ae00d3b5bf2eb4d1cad5bb68cef0074346 [diff] |
Close fd on error path in do_mount() This fix closes a file descriptor before returning error from do_mount() Change-Id: Ib370229f16bf9ac385162d6b163cc5b079a1e73e
diff --git a/init/builtins.c b/init/builtins.c index c192551..7f4daa7 100644 --- a/init/builtins.c +++ b/init/builtins.c
@@ -433,6 +433,7 @@ sprintf(tmp, "/dev/block/loop%d", n); loop = open(tmp, mode); if (loop < 0) { + close(fd); return -1; }