mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
cov: fix leaking openned file descriptors
Once the FD is no longer needed, close it.
This commit is contained in:
parent
9b85ecb85b
commit
2ab784440a
@ -216,6 +216,8 @@ static void _online_pvid_file_remove_devno(int major, int minor)
|
||||
}
|
||||
|
||||
rv = read(fd, buf_in, sizeof(buf_in));
|
||||
if (close(fd))
|
||||
log_sys_debug("close", path);
|
||||
if (!rv || rv < 0) {
|
||||
log_debug("Failed to read %s", path);
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user