mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-02 15:40:38 +02:00
test-unwind leaks a file descriptor
* test-suite/standalone/test-unwind.c (check_ports): explicitly close temp file
This commit is contained in:
parent
0863e3d2fb
commit
98f4024e0a
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue