summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2022-01-01 11:23:13 +0100
committerraveit65 <[email protected]>2022-07-10 21:28:37 +0200
commit2e6ed9adabe4d139706e6b637078451769ad4692 (patch)
tree59aa1fb7a4236498c537f0bb1c806a3d2d273074
parent34e381a2f7b7319d0befa3040a5c3b5db900f49d (diff)
downloadmate-utils-2e6ed9adabe4d139706e6b637078451769ad4692.tar.bz2
mate-utils-2e6ed9adabe4d139706e6b637078451769ad4692.tar.xz
mate-dictionary: fix memory leak
-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");