leak in IMHandler::signalIMPreeditChanged early return

This commit is contained in:
Caolán McNamara 2012-03-06 10:30:58 +00:00
parent c05373e331
commit d99251cecd
2 changed files with 1 additions and 7 deletions

View file

@ -227,10 +227,6 @@ utl::ConfigManager::addConfigItem(utl::ConfigItem & item) {
} }
void utl::ConfigManager::removeConfigItem(utl::ConfigItem & item) { void utl::ConfigManager::removeConfigItem(utl::ConfigItem & item) {
static int hack = 0;
fprintf(stderr, "remove %d of %p\n", hack, &item);
++hack;
for (std::list< ConfigItem * >::iterator i(items_.begin()); for (std::list< ConfigItem * >::iterator i(items_.begin());
i != items_.end(); ++i) i != items_.end(); ++i)
{ {
@ -243,9 +239,6 @@ void utl::ConfigManager::removeConfigItem(utl::ConfigItem & item) {
void utl::ConfigManager::registerConfigItem(utl::ConfigItem * item) { void utl::ConfigManager::registerConfigItem(utl::ConfigItem * item) {
OSL_ASSERT(item != 0); OSL_ASSERT(item != 0);
static int hack = 0;
fprintf(stderr, "add %d is %p\n", hack, item);
++hack;
items_.push_back(item); items_.push_back(item);
} }

View file

@ -3925,6 +3925,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
if( pThis->m_aInputEvent.maText.Len() == 0 ) if( pThis->m_aInputEvent.maText.Len() == 0 )
{ {
g_free( pText ); g_free( pText );
pango_attr_list_unref( pAttrs );
return; return;
} }
} }