[gtk+] application: Revert the leak plug
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] application: Revert the leak plug
- Date: Fri, 18 Jun 2010 13:27:42 +0000 (UTC)
commit 2755b93913027a0325f40ed9215e9063aecacfe4
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Fri Jun 18 14:26:05 2010 +0100
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.
gtk/gtkapplication.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index 139f056..4fa63eb 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -134,7 +134,7 @@ gtk_application_default_prepare_activation (GApplication *application,
GVariant *platform_data)
{
GVariantIter iter;
- gchar *key;
+ const gchar *key;
GVariant *value;
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 &&
g_variant_is_of_type (value, G_VARIANT_TYPE_STRING))
gdk_notify_startup_complete_with_id (g_variant_get_string (value, NULL));
-
- g_free (key);
g_variant_unref (value);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]