only unset the startup_desktop_id once, and dont free the string we pass to putenv
[mikachu/openbox.git] / openbox / openbox.c
index 48f31f9..0c74b25 100644 (file)
@@ -515,9 +515,7 @@ static void remove_args(gint *argc, gchar **argv, gint index, gint num)
 static void parse_env()
 {
     /* unset this so we don't pass it on unknowingly */
-    gchar *s = g_strdup("DESKTOP_STARTUP_ID");
-    putenv(s);
-    g_free(s);
+    putenv(g_strdup("DESKTOP_STARTUP_ID"));
 }
 
 static void parse_args(gint *argc, gchar **argv)