summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorJP Abgrall <jpa@google.com>2014-11-13 19:10:16 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-13 19:10:16 +0000
commit755b9099203fd1b491bf82dc8dad5bafba4f6bcd (patch)
treed616a87972856cdccce5871e8ae843c09f5239ba /init
parent9b5b2d2c23d85699d30c104e0ca9535dd21fe87d (diff)
parentc325535d3de1d103d5d40c5267df9ff9325bb3e3 (diff)
downloadsystem_core-755b9099203fd1b491bf82dc8dad5bafba4f6bcd.zip
system_core-755b9099203fd1b491bf82dc8dad5bafba4f6bcd.tar.gz
system_core-755b9099203fd1b491bf82dc8dad5bafba4f6bcd.tar.bz2
am c325535d: Merge "Close fd on error path in do_mount()"
* commit 'c325535d3de1d103d5d40c5267df9ff9325bb3e3': 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;
}