Skip to content
Snippets Groups Projects
Commit bf851fbe authored by Simon McVittie's avatar Simon McVittie
Browse files

Merge branch 'auto-temp-dir-leak' into 'master'

_GLNX_TEST_SCOPED_TEMP_DIR: Fix memory and fd leak

See merge request GNOME/libglnx!14
parents c316e517 a652ede2
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment