changeset 13631:35b7b1ae809a

[gaim-migrate @ 16020] Using Valgrind, datallah found some places in oscar where we were using unintialised memory. I fixed it! committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 12 Apr 2006 02:49:20 +0000
parents bbc56ff2bd62
children c4a5d8950d8c
files src/protocols/oscar/oscar.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Wed Apr 12 01:51:57 2006 +0000
+++ b/src/protocols/oscar/oscar.c	Wed Apr 12 02:49:20 2006 +0000
@@ -1237,6 +1237,7 @@
 	new_conn_data->conn = flap_connection_new(od, SNAC_FAMILY_AUTH);
 	new_conn_data->cookielen = 0;
 	new_conn_data->cookie = NULL;
+	new_conn_data->data = NULL;
 
 	if (gaim_proxy_connect(account,
 			gaim_account_get_string(account, "server", OSCAR_DEFAULT_LOGIN_SERVER),
@@ -1356,6 +1357,7 @@
 	new_conn_data->conn = flap_connection_new(od, SNAC_FAMILY_LOCATE);
 	new_conn_data->cookielen = info->cookielen;
 	new_conn_data->cookie = g_memdup(info->cookie, info->cookielen);
+	new_conn_data->data = NULL;
 	rc = gaim_proxy_connect(gc->account, host, port, connection_established_cb, new_conn_data);
 	g_free(host);
 	if (rc < 0) {
@@ -1641,6 +1643,10 @@
 		new_conn_data->data = cc;
 		gaim_debug_info("oscar", "Connecting to chat room %s exchange %hu\n", cc->name, cc->exchange);
 	}
+	else
+	{
+		new_conn_data->data = NULL;
+	}
 
 	if (gaim_proxy_connect(account, host, port, connection_established_cb, new_conn_data) != 0)
 	{