From 074f2be436d3402038e9b1d423d7f3582072a9d6 Mon Sep 17 00:00:00 2001 From: rbuj Date: Sat, 1 Jan 2022 11:23:13 +0100 Subject: mate-dictionary: fix memory leak --- mate-dictionary/libgdict/gdict-defbox.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mate-dictionary/libgdict/gdict-defbox.c') diff --git a/mate-dictionary/libgdict/gdict-defbox.c b/mate-dictionary/libgdict/gdict-defbox.c index 247bf8e9..8f6e0d23 100644 --- a/mate-dictionary/libgdict/gdict-defbox.c +++ b/mate-dictionary/libgdict/gdict-defbox.c @@ -200,6 +200,8 @@ gdict_defbox_dispose (GObject *gobject) priv->regular_cursor = NULL; } + g_clear_pointer (&priv->word, g_free); + G_OBJECT_CLASS (gdict_defbox_parent_class)->dispose (gobject); } @@ -2548,6 +2550,7 @@ gdict_defbox_lookup (GdictDefbox *defbox, G_CALLBACK (error_cb), defbox); + g_free (priv->word); priv->word = g_strdup (word); g_object_notify (G_OBJECT (defbox), "word"); -- cgit v1.2.1