mirror of
git://sourceware.org/git/lvm2.git
synced 2025-12-15 08:23:51 +03:00
Don't leak a file descriptor in fcntl_lock_file(), when fcntl fails.
This commit is contained in:
@@ -245,6 +245,7 @@ int fcntl_lock_file(const char *file, short lock_type, int warn_if_read_only)
|
||||
|
||||
if (fcntl(lockfd, F_SETLKW, &lock)) {
|
||||
log_sys_error("fcntl", file);
|
||||
close(lockfd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user