Mercurial > pidgin.yaz
changeset 28642:4bf9579328f0
Don't free what you don't own.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Fri, 18 Sep 2009 19:52:23 +0000 |
parents | 154b4042d8cf |
children | 126251d39bcc |
files | libpurple/protocols/yahoo/libymsg.c |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/libymsg.c Fri Sep 18 19:50:00 2009 +0000 +++ b/libpurple/protocols/yahoo/libymsg.c Fri Sep 18 19:52:23 2009 +0000 @@ -4149,7 +4149,6 @@ 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 @@ 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 @@ 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); }