summaryrefslogtreecommitdiff
path: root/applets/notification_area
diff options
context:
space:
mode:
Diffstat (limited to 'applets/notification_area')
-rw-r--r--applets/notification_area/status-notifier/sn-dbus-menu.c4
-rw-r--r--applets/notification_area/status-notifier/sn-item-v0.c12
-rw-r--r--applets/notification_area/system-tray/na-tray.c6
3 files changed, 9 insertions, 13 deletions
diff --git a/applets/notification_area/status-notifier/sn-dbus-menu.c b/applets/notification_area/status-notifier/sn-dbus-menu.c
index 03a95a4b..323663a5 100644
--- a/applets/notification_area/status-notifier/sn-dbus-menu.c
+++ b/applets/notification_area/status-notifier/sn-dbus-menu.c
@@ -419,8 +419,8 @@ sn_dbus_menu_finalize (GObject *object)
menu = SN_DBUS_MENU (object);
- g_free (menu->bus_name);
- g_free (menu->object_path);
+ g_clear_pointer (&menu->bus_name, g_free);
+ g_clear_pointer (&menu->object_path, g_free);
G_OBJECT_CLASS (sn_dbus_menu_parent_class)->finalize (object);
}
diff --git a/applets/notification_area/status-notifier/sn-item-v0.c b/applets/notification_area/status-notifier/sn-item-v0.c
index 3ec4d037..d302cbf9 100644
--- a/applets/notification_area/status-notifier/sn-item-v0.c
+++ b/applets/notification_area/status-notifier/sn-item-v0.c
@@ -640,7 +640,7 @@ update_title (GObject *source_object,
v0 = SN_ITEM_V0 (user_data);
- g_clear_pointer (&v0->title, g_free);
+ g_free (v0->title);
v0->title = g_variant_dup_string (variant, NULL);
g_clear_pointer (&variant, g_variant_unref);
@@ -668,7 +668,7 @@ update_icon_name (GObject *source_object,
v0 = SN_ITEM_V0 (user_data);
- g_clear_pointer (&v0->icon_name, g_free);
+ g_free (v0->icon_name);
v0->icon_name = g_variant_dup_string (variant, NULL);
g_clear_pointer (&variant, g_variant_unref);
@@ -719,7 +719,7 @@ update_overlay_icon_name (GObject *source_object,
v0 = SN_ITEM_V0 (user_data);
- g_clear_pointer (&v0->overlay_icon_name, g_free);
+ g_free (v0->overlay_icon_name);
v0->overlay_icon_name = g_variant_dup_string (variant, NULL);
g_clear_pointer (&variant, g_variant_unref);
@@ -770,7 +770,7 @@ update_attention_icon_name (GObject *source_object,
v0 = SN_ITEM_V0 (user_data);
- g_clear_pointer (&v0->attention_icon_name, g_free);
+ g_free (v0->attention_icon_name);
v0->attention_icon_name = g_variant_dup_string (variant, NULL);
g_clear_pointer (&variant, g_variant_unref);
@@ -792,7 +792,7 @@ update_attention_icon_pixmap (GObject *source_object,
v0 = SN_ITEM_V0 (user_data);
- g_clear_pointer (&v0->attention_icon_pixmap, icon_pixmap_free);
+ icon_pixmap_free (v0->attention_icon_pixmap);
v0->attention_icon_pixmap = icon_pixmap_new (variant);
g_clear_pointer (&variant, g_variant_unref);
@@ -821,7 +821,7 @@ update_tooltip (GObject *source_object,
v0 = SN_ITEM_V0 (user_data);
- g_clear_pointer (&v0->tooltip, sn_tooltip_free);
+ sn_tooltip_free (v0->tooltip);
v0->tooltip = sn_tooltip_new (variant);
g_clear_pointer (&variant, g_variant_unref);
diff --git a/applets/notification_area/system-tray/na-tray.c b/applets/notification_area/system-tray/na-tray.c
index fee75dc8..df5c6791 100644
--- a/applets/notification_area/system-tray/na-tray.c
+++ b/applets/notification_area/system-tray/na-tray.c
@@ -161,13 +161,9 @@ static void
icon_tip_buffer_free (gpointer data,
gpointer userdata)
{
- IconTipBuffer *buffer;
-
- buffer = data;
+ IconTipBuffer *buffer = data;
g_free (buffer->text);
- buffer->text = NULL;
-
g_free (buffer);
}