summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-02-20 18:39:31 +0100
committerraveit65 <[email protected]>2021-02-22 08:15:34 +0100
commitb3221a9c6363851469822c25702f5b986ed479c6 (patch)
tree158739895eea59feb172f144e9c30eda410d5715
parent7e99bd8fa3b454449e4b8744ebe6b150fa0a4049 (diff)
downloadmate-panel-b3221a9c6363851469822c25702f5b986ed479c6.tar.bz2
mate-panel-b3221a9c6363851469822c25702f5b986ed479c6.tar.xz
notification_area: fix memory leak
-rw-r--r--applets/notification_area/status-notifier/sn-item-v0.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/applets/notification_area/status-notifier/sn-item-v0.c b/applets/notification_area/status-notifier/sn-item-v0.c
index 35d28449..dca5dbb7 100644
--- a/applets/notification_area/status-notifier/sn-item-v0.c
+++ b/applets/notification_area/status-notifier/sn-item-v0.c
@@ -853,11 +853,13 @@ static void
new_label_cb (SnItemV0 *v0,
GVariant *parameters)
{
- char *label = NULL;
+ GVariant *variant;
+
+ variant = g_variant_get_child_value (parameters, 0);
g_free (v0->label);
- g_variant_get (parameters, "(ss)", &label, NULL);
- v0->label = g_strdup (label);
+ v0->label = g_variant_dup_string (variant, NULL);
+ g_variant_unref (variant);
queue_update (v0);
}