[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 06/06: test-unwind leaks a file descriptor
From: |
Mike Gran |
Subject: |
[Guile-commits] 06/06: test-unwind leaks a file descriptor |
Date: |
Wed, 18 Apr 2018 12:00:30 -0400 (EDT) |
mike121 pushed a commit to branch wip-mingw-guile-2.2
in repository guile.
commit 98f4024e0a34f0629cbb75c9ddb7039ec9b5a1ba
Author: Michael Gran <address@hidden>
Date: Wed Apr 18 08:58:42 2018 -0700
test-unwind leaks a file descriptor
* test-suite/standalone/test-unwind.c (check_ports): explicitly close temp
file
---
test-suite/standalone/test-unwind.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/test-suite/standalone/test-unwind.c
b/test-suite/standalone/test-unwind.c
index 3aa3e15..c73f5c4 100644
--- a/test-suite/standalone/test-unwind.c
+++ b/test-suite/standalone/test-unwind.c
@@ -221,8 +221,10 @@ check_ports ()
/* Sanity check: Make sure that `filename' is actually writeable.
We used to use mktemp(3), but that is now considered a security risk. */
- if (0 > mkstemp (filename))
+ int fd = mkstemp (filename);
+ if (fd < 0)
exit (EXIT_FAILURE);
+ close (fd);
scm_dynwind_begin (0);
{
- [Guile-commits] branch wip-mingw-guile-2.2 updated (34131e3 -> 98f4024), Mike Gran, 2018/04/18
- [Guile-commits] 02/06: simplify reading http headers using updated %read-line, Mike Gran, 2018/04/18
- [Guile-commits] 01/06: Let read-line handle alternate line endings, Mike Gran, 2018/04/18
- [Guile-commits] 03/06: Wrong preprocessor test for include guard for sys/select.h, Mike Gran, 2018/04/18
- [Guile-commits] 05/06: test shouldn't presume UTF-8 can be installed, Mike Gran, 2018/04/18
- [Guile-commits] 06/06: test-unwind leaks a file descriptor,
Mike Gran <=
- [Guile-commits] 04/06: test-foreign-object-c needs libgnu, Mike Gran, 2018/04/18