changeset 26650:3712d32363dd

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.
author Sulabh Mahajan <sulabh@soc.pidgin.im>
date Wed, 15 Apr 2009 15:46:31 +0000
parents d00a8111e479
children b370aad5893f 332d967670e0 b623c1824f29
files libpurple/protocols/yahoo/yahoo.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo.c	Wed Apr 15 01:44:17 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoo.c	Wed Apr 15 15:46:31 2009 +0000
@@ -2973,8 +2973,10 @@
 
 		/* 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);
 		}
 	}
 }