summaryrefslogtreecommitdiff
path: root/mate-dictionary
diff options
context:
space:
mode:
authorrbuj <[email protected]>2022-01-01 11:23:13 +0100
committerraveit65 <[email protected]>2022-02-11 17:33:47 +0100
commit074f2be436d3402038e9b1d423d7f3582072a9d6 (patch)
tree0499da9121df563cc6a5f216e89cc306ea0e1ff8 /mate-dictionary
parent26cd61275d4b626ea663abfeb2d4a6befd1e8b1f (diff)
downloadmate-utils-074f2be436d3402038e9b1d423d7f3582072a9d6.tar.bz2
mate-utils-074f2be436d3402038e9b1d423d7f3582072a9d6.tar.xz
mate-dictionary: fix memory leak
Diffstat (limited to 'mate-dictionary')
-rw-r--r--mate-dictionary/libgdict/gdict-defbox.c3
1 files changed, 3 insertions, 0 deletions
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");