application: Revert the leak plug

The &s in the signature of a GVariant means "pass me a pointer". To
avoid repeating the same mistake, use a const gchar* to declare the
key.
This commit is contained in:
Emmanuele Bassi 2010-06-18 14:26:05 +01:00
parent 3e1b82336c
commit 2755b93913

View File

@ -134,7 +134,7 @@ gtk_application_default_prepare_activation (GApplication *application,
GVariant *platform_data) GVariant *platform_data)
{ {
GVariantIter iter; GVariantIter iter;
gchar *key; const gchar *key;
GVariant *value; GVariant *value;
g_variant_iter_init (&iter, platform_data); g_variant_iter_init (&iter, platform_data);
@ -143,8 +143,6 @@ gtk_application_default_prepare_activation (GApplication *application,
if (strcmp (key, "startup-notification-id") == 0 && if (strcmp (key, "startup-notification-id") == 0 &&
g_variant_is_of_type (value, G_VARIANT_TYPE_STRING)) g_variant_is_of_type (value, G_VARIANT_TYPE_STRING))
gdk_notify_startup_complete_with_id (g_variant_get_string (value, NULL)); gdk_notify_startup_complete_with_id (g_variant_get_string (value, NULL));
g_free (key);
g_variant_unref (value); g_variant_unref (value);
} }