pidgin: 92093f7d: Two leak fixes for purple_icqinfo()

evands at pidgin.im evands at pidgin.im
Tue May 27 17:50:40 EDT 2008


-----------------------------------------------------------------
Revision: 92093f7de4f345eebf236fdcdd5a11945c86c01f
Ancestor: 9b525b5c4c6669ae4f0bf88fd4cbada73ef42668
Author: evands at pidgin.im
Date: 2008-05-27T21:47:41
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/92093f7de4f345eebf236fdcdd5a11945c86c01f

Modified files:
        libpurple/protocols/oscar/oscar.c

ChangeLog: 

Two leak fixes for purple_icqinfo()

-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/oscar.c	2873004c968a810d9ba4267ee0ac77690179791a
+++ libpurple/protocols/oscar/oscar.c	2ffd8f85181eaa9467caa631f25b7bffc7fa0a41
@@ -3773,8 +3773,7 @@ static int purple_icqinfo(OscarData *od,
 	if ((info->age > 0) && (info->age < 255)) {
 		char age[5];
 		snprintf(age, sizeof(age), "%hhd", info->age);
-		purple_notify_user_info_add_pair(user_info,
-													_("Age"), age);
+		purple_notify_user_info_add_pair(user_info, _("Age"), age);
 	}
 	if (info->personalwebpage && info->personalwebpage[0] && (utf8 = oscar_utf8_try_convert(gc->account, info->personalwebpage))) {
 		buf = g_strdup_printf("<a href=\"%s\">%s</a>", utf8, utf8);
@@ -3798,8 +3797,8 @@ static int purple_icqinfo(OscarData *od,
 				utf8 && *utf8 ? utf8 : "");
 		g_free(utf8);
 
-		oscar_user_info_convert_and_add(account,
-				user_info, _("Status"), tmp);
+		purple_notify_user_info_add_pair(user_info, _("Status"), tmp);
+		g_free(tmp);
 	}
 
 	oscar_user_info_convert_and_add(account, user_info, _("Additional Information"), info->info);
@@ -3830,8 +3829,9 @@ static int purple_icqinfo(OscarData *od,
 		
 		if (info->workwebpage && info->workwebpage[0] && (utf8 = oscar_utf8_try_convert(gc->account, info->workwebpage))) {
 			char *webpage = g_strdup_printf("<a href=\"%s\">%s</a>", utf8, utf8);
-			oscar_user_info_convert_and_add(account, user_info, _("Web Page"), webpage);
+			purple_notify_user_info_add_pair(user_info, _("Web Page"), webpage);
 			g_free(webpage);
+			g_free(utf8);
 		}
 	}
 


More information about the Commits mailing list