(ef_open): Leaked file descriptor when fcntl() failed.
This commit is contained in:
parent
0890911655
commit
e1926d9ce9
1 changed files with 1 additions and 0 deletions
|
@ -106,6 +106,7 @@ ef_open(int type, int how)
|
|||
lock.l_start = lock.l_len = 0;
|
||||
if (fcntl(fd, F_SETLK, &lock) == -1) {
|
||||
logerror("Can't lock %s (%s)", ep->file, strerror(errno));
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue