im.pidgin.pidgin: 521bdccbaa081e1d700cbd4c603f84fe947aa2b3

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Thu Jan 17 01:35:54 EST 2008


-----------------------------------------------------------------
Revision: 521bdccbaa081e1d700cbd4c603f84fe947aa2b3
Ancestor: 48dc4ee055916f77c187f093dccfc198759ef573
Author: rekkanoryo at pidgin.im
Date: 2008-01-17T06:17:02
Branch: im.pidgin.pidgin

Modified files:
        libpurple/protocols/yahoo/yahoo_aliases.c

ChangeLog: 

Plug a leak.

-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/yahoo_aliases.c	da61ec40f8f8be27ba46f81df66d309c2e3abfde
+++ libpurple/protocols/yahoo/yahoo_aliases.c	faf7aef0c36a36db4117a6dfcf98bfad83af6764
@@ -227,11 +227,11 @@ yahoo_update_alias(PurpleConnection *gc,
 	struct yahoo_data *yd;
 	struct YahooUser *yu;
 	char *content, *url, *request, *webpage, *webaddress, *strtmp;
+	char *escaped_alias, *alias_jp, *converted_alias_jp;
 	int inttmp;
 	struct callback_data *cb;
 	PurpleBuddy *buddy;
 	PurpleUtilFetchUrlData *url_data;
-	char *alias_jp, *converted_alias_jp;
 
 	g_return_if_fail(alias != NULL);
 	g_return_if_fail(who != NULL);
@@ -267,9 +267,11 @@ yahoo_update_alias(PurpleConnection *gc,
 		g_free(alias_jp);
 	}
 	else {
+		escaped_alias = g_markup_escape_text(alias, strlen(alias));
 		content = g_strdup_printf("<?xml version=\"1.0\" encoding=\"utf-8\"?><ab k=\"%s\" cc=\"1\">\n"
 		                          "<ct e=\"1\"  yi='%s' id='%s' nn='%s' pr='0' />\n</ab>\r\n",
-		                          gc->account->username, who, yu->id, g_markup_escape_text(alias, strlen(alias)));
+		                          gc->account->username, who, yu->id, escaped_alias);
+		g_free(escaped_alias);
 	}
 
 	request = g_strdup_printf("POST /%s HTTP/1.1\r\n"


More information about the Commits mailing list