git: 2abaf8acd51c - stable/15 - diff3: plug fd leak
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 06 Apr 2026 16:52:20 UTC
The branch stable/15 has been updated by bapt:
URL: https://cgit.FreeBSD.org/src/commit/?id=2abaf8acd51cf12a8a2e68b28ec24b9d37cbceaa
commit 2abaf8acd51cf12a8a2e68b28ec24b9d37cbceaa
Author: Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2026-03-26 07:40:29 +0000
Commit: Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2026-04-06 16:51:46 +0000
diff3: plug fd leak
MFC After: 1 week
Reported by: kib
(cherry picked from commit 33424fd50ee0333bc6f70b5b14a270b85e5b5de1)
---
usr.bin/diff3/diff3.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/usr.bin/diff3/diff3.c b/usr.bin/diff3/diff3.c
index 75e8c6297855..8212b51e15a2 100644
--- a/usr.bin/diff3/diff3.c
+++ b/usr.bin/diff3/diff3.c
@@ -947,6 +947,7 @@ wait_and_check(int pd)
if (errno != EINTR)
err(2, "pdwait");
}
+ close(pd);
if (WIFEXITED(status) && WEXITSTATUS(status) >= 2)
errx(2, "diff exited abnormally");