From bfd72d86a3f025b2365028924c8ebade280d2fbc Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 20 Jan 2025 16:44:53 +0000 Subject: [PATCH 1/2] cc-mask-paintable: Fix a minor string leak Signed-off-by: Philip Withnall --- panels/common/cc-mask-paintable.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/panels/common/cc-mask-paintable.c b/panels/common/cc-mask-paintable.c index 3ff10067bc..24fb08a68b 100644 --- a/panels/common/cc-mask-paintable.c +++ b/panels/common/cc-mask-paintable.c @@ -141,6 +141,16 @@ cc_mask_paintable_dispose (GObject *object) G_OBJECT_CLASS (cc_mask_paintable_parent_class)->dispose (object); } +static void +cc_mask_paintable_finalize (GObject *object) +{ + CcMaskPaintable *self = CC_MASK_PAINTABLE (object); + + g_free (self->resource_path); + + G_OBJECT_CLASS (cc_mask_paintable_parent_class)->finalize (object); +} + static void cc_mask_paintable_get_property (GObject *object, guint prop_id, @@ -195,6 +205,7 @@ cc_mask_paintable_class_init (CcMaskPaintableClass *klass) GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = cc_mask_paintable_dispose; + object_class->finalize = cc_mask_paintable_finalize; object_class->get_property = cc_mask_paintable_get_property; object_class->set_property = cc_mask_paintable_set_property; -- GitLab From 4ca022c3b3042965ef14532092aee8c7ec66e57c Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 20 Jan 2025 16:45:16 +0000 Subject: [PATCH 2/2] cc-bar-chart-bar: Fix a minor string leak Signed-off-by: Philip Withnall --- panels/wellbeing/cc-bar-chart-bar.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/panels/wellbeing/cc-bar-chart-bar.c b/panels/wellbeing/cc-bar-chart-bar.c index 7b15bd878c..7e119e944a 100644 --- a/panels/wellbeing/cc-bar-chart-bar.c +++ b/panels/wellbeing/cc-bar-chart-bar.c @@ -87,6 +87,7 @@ static void cc_bar_chart_bar_set_property (GObject *object, const GValue *value, GParamSpec *pspec); static void cc_bar_chart_bar_dispose (GObject *object); +static void cc_bar_chart_bar_finalize (GObject *object); static void cc_bar_chart_bar_measure (GtkWidget *widget, GtkOrientation orientation, int for_size, @@ -104,6 +105,7 @@ cc_bar_chart_bar_class_init (CcBarChartBarClass *klass) object_class->get_property = cc_bar_chart_bar_get_property; object_class->set_property = cc_bar_chart_bar_set_property; object_class->dispose = cc_bar_chart_bar_dispose; + object_class->finalize = cc_bar_chart_bar_finalize; widget_class->measure = cc_bar_chart_bar_measure; @@ -217,6 +219,16 @@ cc_bar_chart_bar_dispose (GObject *object) G_OBJECT_CLASS (cc_bar_chart_bar_parent_class)->dispose (object); } +static void +cc_bar_chart_bar_finalize (GObject *object) +{ + CcBarChartBar *self = CC_BAR_CHART_BAR (object); + + g_free (self->accessible_description); + + G_OBJECT_CLASS (cc_bar_chart_bar_parent_class)->finalize (object); +} + static const unsigned int MINIMUM_BAR_WIDTH = 10; static const unsigned int NATURAL_BAR_WIDTH = 40; -- GitLab