summaryrefslogtreecommitdiff
path: root/tests/libglnx-testlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libglnx-testlib.c')
-rw-r--r--tests/libglnx-testlib.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/libglnx-testlib.c b/tests/libglnx-testlib.c
index 5687d80..869d144 100644
--- a/tests/libglnx-testlib.c
+++ b/tests/libglnx-testlib.c
@@ -23,6 +23,8 @@
#include <errno.h>
+#include <glib/gstdio.h>
+
#include "libglnx.h"
struct _GLnxTestAutoTempDir
@@ -63,4 +65,10 @@ _glnx_test_auto_temp_dir_leave (_GLnxTestAutoTempDir *dir)
glnx_tmpdir_delete (&dir->temp_dir, NULL, &error);
g_assert_no_error (error);
+
+ g_close (dir->old_cwd_fd, &error);
+ g_assert_no_error (error);
+
+ g_free (dir->old_cwd);
+ g_free (dir);
}