[epiphany/mcatanzaro/#1103: 3/3] desktop-utils: fix leak in is_desktop_pantheon()
- From: Jan-Michael Brummer <jbrummer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/#1103: 3/3] desktop-utils: fix leak in is_desktop_pantheon()
- Date: Mon, 17 Feb 2020 20:31:46 +0000 (UTC)
commit 83a89e1ae9da0f4146ffc75fda86527a541382f5
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Mon Feb 17 13:53:28 2020 -0600
desktop-utils: fix leak in is_desktop_pantheon()
This leaks the entire environment. There's no need for it; we can just
use getenv().
Fixes #1103
src/ephy-desktop-utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/ephy-desktop-utils.c b/src/ephy-desktop-utils.c
index b8941906d..9adabce3f 100644
--- a/src/ephy-desktop-utils.c
+++ b/src/ephy-desktop-utils.c
@@ -24,7 +24,7 @@
gboolean
is_desktop_pantheon (void)
{
- const gchar *xdg_current_desktop = g_environ_getenv (g_get_environ (), "XDG_CURRENT_DESKTOP");
+ const gchar *xdg_current_desktop = g_getenv ("XDG_CURRENT_DESKTOP");
if (!xdg_current_desktop)
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]