comparison libpurple/protocols/yahoo/yahoo_profile.c @ 23090: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 7d8c06d88125
children e0bcb8cfda74
comparison
equal deleted inserted replaced
23089:815caea3bdd0 23090:49982266aa0f
944 */ 944 */
945 url_data = purple_util_fetch_url(photo_url_text, use_whole_url, NULL, 945 url_data = purple_util_fetch_url(photo_url_text, use_whole_url, NULL,
946 FALSE, yahoo_got_photo, info2_data); 946 FALSE, yahoo_got_photo, info2_data);
947 if (url_data != NULL) 947 if (url_data != NULL)
948 yd->url_datas = g_slist_prepend(yd->url_datas, url_data); 948 yd->url_datas = g_slist_prepend(yd->url_datas, url_data);
949 else {
950 g_free(info2_data->info_data->name);
951 g_free(info2_data->info_data);
952 g_free(info2_data);
953 }
954 } else { 949 } else {
955 /* Emulate a callback */ 950 /* Emulate a callback */
956 yahoo_got_photo(NULL, info2_data, NULL, 0, NULL); 951 yahoo_got_photo(NULL, info2_data, NULL, 0, NULL);
957 } 952 }
958 } 953 }
1284 (yd->jp ? YAHOOJP_PROFILE_URL : YAHOO_PROFILE_URL), name); 1279 (yd->jp ? YAHOOJP_PROFILE_URL : YAHOO_PROFILE_URL), name);
1285 1280
1286 url_data = purple_util_fetch_url(url, TRUE, NULL, FALSE, yahoo_got_info, data); 1281 url_data = purple_util_fetch_url(url, TRUE, NULL, FALSE, yahoo_got_info, data);
1287 if (url_data != NULL) 1282 if (url_data != NULL)
1288 yd->url_datas = g_slist_prepend(yd->url_datas, url_data); 1283 yd->url_datas = g_slist_prepend(yd->url_datas, url_data);
1289 else {
1290 g_free(data->name);
1291 g_free(data);
1292 }
1293 1284
1294 g_free(url); 1285 g_free(url);
1295 } 1286 }