[glib] tests: Fix leak in appmonitor test
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] tests: Fix leak in appmonitor test
- Date: Wed, 23 Aug 2017 10:27:58 +0000 (UTC)
commit 3ce00b29ec0bb240412506affb5c65bdb18c7ad3
Author: Philip Withnall <withnall endlessm com>
Date: Fri Aug 18 09:37:23 2017 +0100
tests: Fix leak in appmonitor test
Spotted by Daniel Macks.
Signed-off-by: Philip Withnall <withnall endlessm com>
https://bugzilla.gnome.org/show_bug.cgi?id=785260
gio/tests/appmonitor.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gio/tests/appmonitor.c b/gio/tests/appmonitor.c
index 34661d8..be46bba 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]