BUGFIX file.c open failure leaves open file handle
Change-Id: Iad8eef2f65af0549da4dbec654c85adb2f325711
This commit is contained in:
parent
68d0175172
commit
f6a2bf28e1
1 changed files with 2 additions and 0 deletions
|
@ -494,6 +494,8 @@ static int open_internal_inner1(const char *path, int oflag,
|
||||||
return fildes;
|
return fildes;
|
||||||
|
|
||||||
file_error:
|
file_error:
|
||||||
|
if (fildes >= 0)
|
||||||
|
close(fildes);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue