summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ChangeLog4
-rw-r--r--NEWS1
-rw-r--r--src/modules/ecore_imf/scim/scim_imcontext.cpp14
3 files changed, 19 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 048348a73b..c6b07d4874 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
12013-09-06 Jihoon Kim
2
3 * ecore_imf: Fix memory leak in scim immodule
4
12013-09-06 Cedric Bail 52013-09-06 Cedric Bail
2 6
3 * Edje: Add border information to Image sets. 7 * Edje: Add border information to Image sets.
diff --git a/NEWS b/NEWS
index 35a7f1d6e6..be7c068356 100644
--- a/NEWS
+++ b/NEWS
@@ -378,6 +378,7 @@ Fixes:
378 - Check the state of last mouse event more properly. 378 - Check the state of last mouse event more properly.
379 * Ecore-imf: 379 * Ecore-imf:
380 - Fix crash when ecore_imf_context_del is called in ecore_imf_context_input_panel_callback_call. 380 - Fix crash when ecore_imf_context_del is called in ecore_imf_context_input_panel_callback_call.
381 - Fix memory leak in scim immodule
381 * Eio: 382 * Eio:
382 - Don't leak fd on exec. 383 - Don't leak fd on exec.
383 - eio functions no longer crash when passed NULL and throw errors accordingly. 384 - eio functions no longer crash when passed NULL and throw errors accordingly.
diff --git a/src/modules/ecore_imf/scim/scim_imcontext.cpp b/src/modules/ecore_imf/scim/scim_imcontext.cpp
index 43392bb5b6..f5bd678ca3 100644
--- a/src/modules/ecore_imf/scim/scim_imcontext.cpp
+++ b/src/modules/ecore_imf/scim/scim_imcontext.cpp
@@ -2721,8 +2721,22 @@ slot_get_surrounding_text(IMEngineInstanceBase *si,
2721 { 2721 {
2722 SCIM_DEBUG_FRONTEND(2) << "Surrounding text: " << surrounding <<"\n"; 2722 SCIM_DEBUG_FRONTEND(2) << "Surrounding text: " << surrounding <<"\n";
2723 SCIM_DEBUG_FRONTEND(2) << "Cursor Index : " << cursor_index <<"\n"; 2723 SCIM_DEBUG_FRONTEND(2) << "Cursor Index : " << cursor_index <<"\n";
2724 if (!surrounding)
2725 return false;
2726
2727 if (cursor_index < 0)
2728 {
2729 free(surrounding);
2730 surrounding = NULL;
2731 return false;
2732 }
2733
2724 WideString before(utf8_mbstowcs(String(surrounding, surrounding + cursor_index))); 2734 WideString before(utf8_mbstowcs(String(surrounding, surrounding + cursor_index)));
2725 WideString after(utf8_mbstowcs(String(surrounding + cursor_index))); 2735 WideString after(utf8_mbstowcs(String(surrounding + cursor_index)));
2736
2737 free(surrounding);
2738 surrounding = NULL;
2739
2726 if (maxlen_before > 0 && ((unsigned int)maxlen_before) < before.length()) 2740 if (maxlen_before > 0 && ((unsigned int)maxlen_before) < before.length())
2727 before = WideString(before.begin() + (before.length() - maxlen_before), before.end()); 2741 before = WideString(before.begin() + (before.length() - maxlen_before), before.end());
2728 else if (maxlen_before == 0) before = WideString(); 2742 else if (maxlen_before == 0) before = WideString();