summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorJP Abgrall <jpa@google.com>2014-11-14 00:47:17 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-14 00:47:17 +0000
commit08807417a7d0d2f857c181f914cd12972fe8988e (patch)
tree5c7e4b9f1b1fa7fc5d413958a4a547c2f6bd83c0 /init
parent3e5319734c45e324871efed26d9feffe11146cc9 (diff)
parent755b9099203fd1b491bf82dc8dad5bafba4f6bcd (diff)
downloadsystem_core-08807417a7d0d2f857c181f914cd12972fe8988e.zip
system_core-08807417a7d0d2f857c181f914cd12972fe8988e.tar.gz
system_core-08807417a7d0d2f857c181f914cd12972fe8988e.tar.bz2
am 755b9099: am c325535d: Merge "Close fd on error path in do_mount()"
* commit '755b9099203fd1b491bf82dc8dad5bafba4f6bcd': Close fd on error path in do_mount()
Diffstat (limited to 'init')
-rw-r--r--init/builtins.c1
1 files changed, 1 insertions, 0 deletions
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 @@ int do_mount(int nargs, char **args)
sprintf(tmp, "/dev/block/loop%d", n);
loop = open(tmp, mode);
if (loop < 0) {
+ close(fd);
return -1;
}