aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/text
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/text')
-rw-r--r--widgets/text/e-completion-match.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/widgets/text/e-completion-match.c b/widgets/text/e-completion-match.c
index cfc7c88cd7..6e7863f887 100644
--- a/widgets/text/e-completion-match.c
+++ b/widgets/text/e-completion-match.c
@@ -84,10 +84,13 @@ e_completion_match_set_text (ECompletionMatch *match,
const gchar *match_text,
const gchar *menu_text)
{
+ gchar *to_be_freed_match_text;
+ gchar *to_be_freed_menu_text;
+
g_return_if_fail (match != NULL);
- g_free (match->match_text);
- g_free (match->menu_text);
+ to_be_freed_match_text = match->match_text;
+ to_be_freed_menu_text = match->menu_text;
if (match_text == NULL) {
match_text = "Unknown_Match";
@@ -103,6 +106,9 @@ e_completion_match_set_text (ECompletionMatch *match,
match->match_text = g_strdup (match_text);
match->menu_text = g_strdup (menu_text);
+
+ g_free (to_be_freed_match_text);
+ g_free (to_be_freed_menu_text);
}
const gchar *