sed/sed-do-not-close-stderr-on-exit.patch
2019-09-30 11:16:48 -04:00

32 lines
818 B
Diff

From 08675afe9af99002bc4770e5db00ce7a05db7575 Mon Sep 17 00:00:00 2001
From: Assaf Gordon <assafgordon@gmail.com>
Date: Tue, 31 Jul 2018 01:42:46 -0600
Subject: [PATCH 21/61] sed: do not close stderr on exit
Not needed, and prevents leak-sanitizing from working.
* sed/utils.c (ck_fclose): Do not close stderr.
---
sed/utils.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sed/utils.c b/sed/utils.c
index 5314ea4..329dec0 100644
--- a/sed/utils.c
+++ b/sed/utils.c
@@ -267,10 +267,7 @@ ck_fclose (FILE *stream)
last output operations might fail and it is important
to signal this as an error (perhaps to make). */
if (!stream)
- {
- do_ck_fclose (stdout);
- do_ck_fclose (stderr);
- }
+ do_ck_fclose (stdout);
}
/* Close a single file. */
--
2.19.1