changeset 20752:e92c9987ba0d

A small memory leak fix.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 02 Oct 2007 04:38:10 +0000
parents fe77cc691f78
children 61045691aa72
files libpurple/protocols/myspace/markup.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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("");