GNOME Bugzilla – Bug 669689
Retrieve cwd and environ in local GApplicationCommandLine
Last modified: 2012-02-08 16:46:23 UTC
Currently, GApplicationCommandLine does not contain the cwd and environ in the local case. The attached patch fixes this.
Created attachment 207121 [details] [review] Retrieve cwd and environ in local GApplicationCommandLine
Review of attachment 207121 [details] [review]: looks good with one very minor tweak ::: gio/gapplicationcommandline.c @@ +253,3 @@ + + g_free (cmdline->priv->cwd); + g_strfreev (cmdline->priv->environ); hum. looks like the environment was leaking before :) @@ +409,3 @@ g_application_command_line_get_environ (GApplicationCommandLine *cmdline) { + return (const gchar * const *)cmdline->priv->environ; (const gchar **) is sufficient here
Created attachment 207125 [details] [review] Retrieve cwd and environ in local GApplicationCommandLine
New patch for completeness. Actually before there was no leak because environ was the internal byte array of the gvariant.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.