Fix mem leak, when finalize a ibus im context.
authorHuang Peng <shawn.p.huang@gmail.com>
Sat, 16 Aug 2008 07:48:23 +0000 (15:48 +0800)
committerHuang Peng <shawn.p.huang@gmail.com>
Sat, 16 Aug 2008 07:48:23 +0000 (15:48 +0800)
client/gtk2/ibusimcontext.c

index c23e09b..0ce6b3c 100644 (file)
@@ -249,8 +249,11 @@ ibus_im_context_finalize (GObject *obj)
         }
     }
 
-    if (priv->ic)
+    if (priv->ic) {
         ibus_im_client_release_input_context (_client, priv->ic);
+        g_hash_table_remove (_ic_table, priv->ic);
+        g_free (priv->ic);
+    }
 
     g_object_unref (priv->slave);