1
Fork 0
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:
Michael Gran 2018-04-18 08:58:42 -07:00
parent 0863e3d2fb
commit 98f4024e0a

View file

@ -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);
{