1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

cov: fix leaking openned file descriptors

Once the FD is no longer needed, close it.
This commit is contained in:
Zdenek Kabelac 2018-10-15 14:34:31 +02:00
parent 9b85ecb85b
commit 2ab784440a

View File

@ -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;