changeset 23092:49982266aa0f

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.
author Daniel Atallah <daniel.atallah@gmail.com>
date Thu, 22 May 2008 18:01:58 +0000
parents 815caea3bdd0
children 69fbad87f8ae
files libpurple/protocols/yahoo/yahoo_picture.c libpurple/protocols/yahoo/yahoo_profile.c
diffstat 2 files changed, 0 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- 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);
 }