summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/PYPBopomofoEditor.cc2
-rw-r--r--src/PYPLibPinyinCandidates.cc2
-rw-r--r--src/PYPPinyinEditor.cc2
3 files changed, 6 insertions, 0 deletions
diff --git a/src/PYPBopomofoEditor.cc b/src/PYPBopomofoEditor.cc
index dafc3cc..f7a7223 100644
--- a/src/PYPBopomofoEditor.cc
+++ b/src/PYPBopomofoEditor.cc
@@ -394,6 +394,8 @@ BopomofoEditor::updatePreeditText ()
guint cursor = getPinyinCursor ();
pinyin_get_character_offset(m_instance, sentence, cursor, &offset);
Editor::updatePreeditText (preedit_text, offset, TRUE);
+
+ g_free (sentence);
}
void
diff --git a/src/PYPLibPinyinCandidates.cc b/src/PYPLibPinyinCandidates.cc
index f404293..f2938bd 100644
--- a/src/PYPLibPinyinCandidates.cc
+++ b/src/PYPLibPinyinCandidates.cc
@@ -111,6 +111,7 @@ LibPinyinCandidates::selectCandidate (EnhancedCandidate & enhanced)
if (m_editor->m_config.rememberEveryInput ())
LibPinyinBackEnd::instance ().rememberUserInput (instance, str);
LibPinyinBackEnd::instance ().modified();
+ g_free (str);
return SELECT_CANDIDATE_COMMIT;
}
@@ -128,6 +129,7 @@ LibPinyinCandidates::selectCandidate (EnhancedCandidate & enhanced)
if (m_editor->m_config.rememberEveryInput ())
LibPinyinBackEnd::instance ().rememberUserInput (instance, str);
LibPinyinBackEnd::instance ().modified ();
+ g_free (str);
return SELECT_CANDIDATE_MODIFY_IN_PLACE|SELECT_CANDIDATE_COMMIT;
}
diff --git a/src/PYPPinyinEditor.cc b/src/PYPPinyinEditor.cc
index fc271e8..fc9ad71 100644
--- a/src/PYPPinyinEditor.cc
+++ b/src/PYPPinyinEditor.cc
@@ -266,6 +266,8 @@ PinyinEditor::updatePreeditText ()
guint cursor = getPinyinCursor ();
pinyin_get_character_offset(m_instance, sentence, cursor, &offset);
Editor::updatePreeditText (preedit_text, offset, TRUE);
+
+ g_free (sentence);
}
#if 0