Skip to content

Commit a4acbeb

Browse files
executor: close the dangling file descriptor in setup_kcov_reset_ioctl()
1 parent 77ff614 commit a4acbeb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

executor/executor_linux.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,8 @@ static const char* setup_kcov_reset_ioctl()
330330
int fd = open("/sys/kernel/debug/kcov", O_RDWR);
331331
if (fd == -1)
332332
return "open of /sys/kernel/debug/kcov failed";
333+
close(fd);
334+
333335
cover_t cov = {};
334336
cov.fd = kCoverFd;
335337
cover_open(&cov, false);

0 commit comments

Comments
 (0)