Merge "Close fd on error path in do_mount()"
This commit is contained in:
commit
c325535d3d
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue