1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cov: ignore leak of fd descriptor

There is no 'fd' leak.
This commit is contained in:
Zdenek Kabelac 2021-09-21 20:20:53 +02:00
parent e6d3587482
commit b0d40109a6

View File

@ -671,12 +671,11 @@ static int _daemonise(struct filemap_monitor *fm)
(void) close(fd);
}
/* TODO: Use libdaemon/server/daemon-server.c _daemonise() */
for (ffd = (int) sysconf(_SC_OPEN_MAX) - 1; ffd > STDERR_FILENO; --ffd) {
if (ffd == fm->fd)
continue;
(void) close(ffd);
}
for (ffd = (int) sysconf(_SC_OPEN_MAX) - 1; ffd > STDERR_FILENO; --ffd)
if (ffd != fm->fd)
(void) close(ffd);
/* coverity[leaked_handle] no leak */
return 1;
}