pidgin: 0bc78221: Don't free what you don't own.

sadrul at pidgin.im sadrul at pidgin.im
Fri Sep 18 22:46:48 EDT 2009


-----------------------------------------------------------------
Revision: 0bc7822198be60e725a7039ab42dc214cfb72a4d
Ancestor: 96c69594a0716d3048d038620091d975d5c0644d
Author: sadrul at pidgin.im
Date: 2009-09-18T19:52:23
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0bc7822198be60e725a7039ab42dc214cfb72a4d

Modified files:
        libpurple/protocols/yahoo/libymsg.c

ChangeLog: 

Don't free what you don't own.

-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/libymsg.c	a17811067e52ff49f16b837c337c8d6836175db5
+++ libpurple/protocols/yahoo/libymsg.c	5502590773a5ac42728f4c98b4fd858bc34807b7
@@ -4149,7 +4149,6 @@ static void yahoo_get_sms_carrier_cb(Pur
 	struct yahoo_sms_carrier_cb_data *sms_cb_data = user_data;
 	PurpleConnection *gc = sms_cb_data->gc;
 	YahooData *yd = gc->proto_data;
-	char *mobile_no = NULL;
 	char *status = NULL;
 	char *carrier = NULL;
 	PurpleAccount *account = purple_connection_get_account(gc);
@@ -4166,7 +4165,7 @@ static void yahoo_get_sms_carrier_cb(Pur
 	else if (len > 0 && webdata && *webdata) {
 		xmlnode *validate_data_root = xmlnode_from_str(webdata, -1);
 		xmlnode *validate_data_child = xmlnode_get_child(validate_data_root, "mobile_no");
-		mobile_no = (char *)xmlnode_get_attrib(validate_data_child, "msisdn");
+		const char *mobile_no = xmlnode_get_attrib(validate_data_child, "msisdn");
 
 		validate_data_root = xmlnode_copy(validate_data_child);
 		validate_data_child = xmlnode_get_child(validate_data_root, "status");
@@ -4191,7 +4190,6 @@ static void yahoo_get_sms_carrier_cb(Pur
 		g_free(sms_cb_data->who);
 		g_free(sms_cb_data->what);
 		g_free(sms_cb_data);
-		g_free(mobile_no);
 		g_free(status);
 		g_free(carrier);
 	}


More information about the Commits mailing list