From 0b6fdff05cc10f5e639a39dd4b79e01a025ad2d5 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 22 Aug 2012 14:48:41 -0400 Subject: [PATCH] Fix regression when TMPDIR/TMP are unset We should just be returning /tmp as a default, not calling g_getenv ("/tmp") which makes no sense. https://bugzilla.gnome.org/show_bug.cgi?id=672329 --- glib/gutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/gutils.c b/glib/gutils.c index 38b5e44a3..49862ac10 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -696,7 +696,7 @@ g_get_any_init_do (void) if (g_tmp_dir == NULL || *g_tmp_dir == '\0') { g_free (g_tmp_dir); - g_tmp_dir = g_strdup (g_getenv ("/tmp")); + g_tmp_dir = g_strdup ("/tmp"); } #endif /* !G_OS_WIN32 */