Fix a double-free in the yahoo profile/icon handling. This is from a downstream

Thu, 22 May 2008 18:01:58 +0000

author
Daniel Atallah <datallah@pidgin.im>
date
Thu, 22 May 2008 18:01:58 +0000
changeset 23257
eece7b44f583
parent 23256
35a4e2bbfa46
child 23258
42c20c4fd623

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.

libpurple/protocols/yahoo/yahoo_picture.c file | annotate | diff | comparison | revisions
libpurple/protocols/yahoo/yahoo_profile.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/yahoo/yahoo_picture.c	Thu May 22 17:09:32 2008 +0000
+++ b/libpurple/protocols/yahoo/yahoo_picture.c	Thu May 22 18:01:58 2008 +0000
@@ -137,9 +137,6 @@
 		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);
--- a/libpurple/protocols/yahoo/yahoo_profile.c	Thu May 22 17:09:32 2008 +0000
+++ b/libpurple/protocols/yahoo/yahoo_profile.c	Thu May 22 18:01:58 2008 +0000
@@ -946,11 +946,6 @@
 				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 @@
 	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);
 }

mercurial