pidgin: 7a490c35: Fix a double-free in the yahoo profile/i..

datallah at pidgin.im datallah at pidgin.im
Thu May 22 14:06:25 EDT 2008


-----------------------------------------------------------------
Revision: 7a490c356e10f7fff3432f875897aa0ca0ad1ff0
Ancestor: 980e5e2fedd41d52ed3f1640268e8964d4b02cde
Author: datallah at pidgin.im
Date: 2008-05-22T18:01:58
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/7a490c356e10f7fff3432f875897aa0ca0ad1ff0

Modified files:
        libpurple/protocols/yahoo/yahoo_picture.c
        libpurple/protocols/yahoo/yahoo_profile.c

ChangeLog: 

Fix a double-free in the yahoo profile/icon handling. This is from a downstream
Debian patch that has apparently been around forever, wasn't submitted to us.
Fixes #5889.

-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/yahoo_picture.c	791256f2ae246ee1bfe137ebca33456df49c5bba
+++ libpurple/protocols/yahoo/yahoo_picture.c	d97debbe4f7e7827719183145df01cec07e3d94f
@@ -137,9 +137,6 @@ void yahoo_process_picture(PurpleConnect
 		if (url_data != NULL) {
 			yd = gc->proto_data;
 			yd->url_datas = g_slist_prepend(yd->url_datas, url_data);
-		} else {
-			g_free(data->who);
-			g_free(data);
 		}
 	} else if (who && send_icon_info) {
 		yahoo_send_picture_info(gc, who);
============================================================
--- libpurple/protocols/yahoo/yahoo_profile.c	26d6480e16b0ae61c3c76aa84fc75d6481e38c6d
+++ libpurple/protocols/yahoo/yahoo_profile.c	6937058169d592bf9a9e0e10aa4200d1427ca7cc
@@ -946,11 +946,6 @@ static void yahoo_got_info(PurpleUtilFet
 				FALSE, yahoo_got_photo, info2_data);
 		if (url_data != NULL)
 			yd->url_datas = g_slist_prepend(yd->url_datas, url_data);
-		else {
-			g_free(info2_data->info_data->name);
-			g_free(info2_data->info_data);
-			g_free(info2_data);
-		}
 	} else {
 		/* Emulate a callback */
 		yahoo_got_photo(NULL, info2_data, NULL, 0, NULL);
@@ -1286,10 +1281,6 @@ void yahoo_get_info(PurpleConnection *gc
 	url_data = purple_util_fetch_url(url, TRUE, NULL, FALSE, yahoo_got_info, data);
 	if (url_data != NULL)
 		yd->url_datas = g_slist_prepend(yd->url_datas, url_data);
-	else {
-		g_free(data->name);
-		g_free(data);
-	}
 
 	g_free(url);
 }


More information about the Commits mailing list