From 172906f150a15658e2b375340307e3d48b640d42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Mon, 22 Jul 2019 00:04:33 +0200
Subject: [PATCH 17/28] CrtcMode: Free the mode name on finalize
https://gitlab.gnome.org/GNOME/mutter/merge_requests/682
---
src/backends/meta-crtc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/backends/meta-crtc.c b/src/backends/meta-crtc.c
index 7ca31ba39..e4da25c5a 100644
--- a/src/backends/meta-crtc.c
+++ b/src/backends/meta-crtc.c
@@ -36,45 +36,47 @@ meta_crtc_finalize (GObject *object)
{
MetaCrtc *crtc = META_CRTC (object);
if (crtc->driver_notify)
crtc->driver_notify (crtc);
G_OBJECT_CLASS (meta_crtc_parent_class)->finalize (object);
}
static void
meta_crtc_init (MetaCrtc *crtc)
{
}
static void
meta_crtc_class_init (MetaCrtcClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = meta_crtc_finalize;
}
static void
meta_crtc_mode_finalize (GObject *object)
{
MetaCrtcMode *crtc_mode = META_CRTC_MODE (object);
if (crtc_mode->driver_notify)
crtc_mode->driver_notify (crtc_mode);
+ g_free (crtc_mode->name);
+
G_OBJECT_CLASS (meta_crtc_mode_parent_class)->finalize (object);
}
static void
meta_crtc_mode_init (MetaCrtcMode *crtc_mode)
{
}
static void
meta_crtc_mode_class_init (MetaCrtcModeClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = meta_crtc_mode_finalize;
}
--
2.26.2