diff src/gtkimhtml.c @ 4138:6b2d0ce7fb18

[gaim-migrate @ 4356] this should fix some memory leaks, thanks to ari for taking the time to work on this committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 25 Dec 2002 02:13:35 +0000
parents 4a3f863b041f
children d03ace5af8da
line wrap: on
line diff
--- a/src/gtkimhtml.c	Wed Dec 25 00:51:00 2002 +0000
+++ b/src/gtkimhtml.c	Wed Dec 25 02:13:35 2002 +0000
@@ -132,8 +132,11 @@
 {
 	GtkIMHtml *imhtml = GTK_IMHTML(object);
 
-	g_hash_table_foreach_remove(imhtml->smiley_data, gtk_smiley_tree_destroy, NULL);
+	g_hash_table_foreach_remove(imhtml->smiley_data, (GHRFunc)gtk_smiley_tree_destroy, NULL);
+	g_hash_table_destroy(imhtml->smiley_data);
 	gtk_smiley_tree_destroy(imhtml->default_smilies);
+	gdk_cursor_unref(imhtml->hand_cursor);
+	gdk_cursor_unref(imhtml->arrow_cursor);
 	G_OBJECT_CLASS(parent_class)->finalize (object);
 }
 
@@ -902,6 +905,8 @@
 				}
 			c += tlen;
 			pos += tlen;
+			if(tag)
+				g_free(tag); /* This was allocated back in VALID_TAG() */
 		} else if (*c == '&' && gtk_imhtml_is_amp_escape (c, &amp, &tlen)) {
 			ws [wpos++] = amp;
 			c += tlen;