A small memory leak fix.

Tue, 02 Oct 2007 04:38:10 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Tue, 02 Oct 2007 04:38:10 +0000
changeset 20814
7792b1d90c31
parent 20813
a5a5bdae8b3f
child 20815
a6c11702ad56

A small memory leak fix.

libpurple/protocols/myspace/markup.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/myspace/markup.c	Tue Oct 02 04:22:26 2007 +0000
+++ b/libpurple/protocols/myspace/markup.c	Tue Oct 02 04:38:10 2007 +0000
@@ -444,7 +444,8 @@
 		*begin = g_strdup_printf("<f s='%d'>", MSIM_TEXT_UNDERLINE);
 		*end = g_strdup("</f>");
 	} else if (!purple_utf8_strcasecmp(root->name, "a")) {
-		const gchar *href, *link_text;
+		const gchar *href;
+		gchar *link_text;
 
 		href = xmlnode_get_attrib(root, "href");
 
@@ -476,6 +477,7 @@
 
 		/* Sorry, kid. MySpace doesn't support you within <a> tags. */
 		xmlnode_free(root->child);
+		g_free(link_text);
 		root->child = NULL;
 
 		*end = g_strdup("");

mercurial