From 3ce00b29ec0bb240412506affb5c65bdb18c7ad3 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 18 Aug 2017 09:37:23 +0100 Subject: [PATCH] tests: Fix leak in appmonitor test Spotted by Daniel Macks. Signed-off-by: Philip Withnall https://bugzilla.gnome.org/show_bug.cgi?id=785260 --- gio/tests/appmonitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gio/tests/appmonitor.c b/gio/tests/appmonitor.c index 34661d88b..be46bba71 100644 --- a/gio/tests/appmonitor.c +++ b/gio/tests/appmonitor.c @@ -97,11 +97,12 @@ test_app_monitor (void) int main (int argc, char *argv[]) { - gchar *path; + gchar *path = NULL; path = g_mkdtemp (g_strdup ("app_monitor_XXXXXX")); g_setenv ("XDG_DATA_DIRS", path, TRUE); g_setenv ("XDG_DATA_HOME", path, TRUE); + g_free (path); g_test_init (&argc, &argv, NULL);