diff options
author | Sulabh Mahajan <sulabh@pidgin.im> | 2009-04-15 15:46:31 +0000 |
---|---|---|
committer | Sulabh Mahajan <sulabh@pidgin.im> | 2009-04-15 15:46:31 +0000 |
commit | 5b8b10617ae93affd1a5a46f3f6a7d9d04d7d8ef (patch) | |
tree | 543cf2f2dca9cf95c2cda0e3b4e14d332d490076 /libpurple | |
parent | 65c7c2c5e32972e08d729ee0c8fa4ad2f83a5f0d (diff) | |
download | pidgin-5b8b10617ae93affd1a5a46f3f6a7d9d04d7d8ef.tar.gz |
Remove a bug where host_ip was accessed after freeing it.
This should prevent yahoo prpl crashes. I wonder how such a simple mistake escaped me for so long.
Diffstat (limited to 'libpurple')
-rw-r--r-- | libpurple/protocols/yahoo/yahoo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libpurple/protocols/yahoo/yahoo.c b/libpurple/protocols/yahoo/yahoo.c index 959934537a..a238d94332 100644 --- a/libpurple/protocols/yahoo/yahoo.c +++ b/libpurple/protocols/yahoo/yahoo.c @@ -2973,8 +2973,10 @@ static void yahoo_process_p2p(PurpleConnection *gc, struct yahoo_packet *pkt) /* connect to host */ if((purple_proxy_connect(NULL, account, host_ip, YAHOO_PAGER_PORT_P2P, yahoo_p2p_init_cb, p2p_data))==NULL) { - yahoo_p2p_disconnect_destroy_data(p2p_data); purple_debug_info("yahoo","p2p: Connection to %s failed\n", host_ip); + g_free(p2p_data->host_ip); + g_free(p2p_data->host_username); + g_free(p2p_data); } } } |