changeset 13058:256abf4dd912

[gaim-migrate @ 15420] Plug a leak. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Sat, 28 Jan 2006 05:15:48 +0000
parents 5a9ff0c8593d
children 1b71ad2eccdb
files src/protocols/simple/simple.c src/protocols/simple/simple.h
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/simple/simple.c	Sat Jan 28 01:35:58 2006 +0000
+++ b/src/protocols/simple/simple.c	Sat Jan 28 05:15:48 2006 +0000
@@ -384,12 +384,12 @@
 	}
 
 	sip->fd = source;
-	sip->connecting = 0;
+	sip->connecting = FALSE;
 	write(sip->fd, sip->sendlater, strlen(sip->sendlater));
 	conn = connection_create(sip, source);
 	conn->inputhandler = gaim_input_add(sip->fd, GAIM_INPUT_READ, simple_input_cb, gc);
 	g_free(sip->sendlater);
-	sip->sendlater = 0;
+	sip->sendlater = NULL;
 }
 
 
@@ -402,11 +402,12 @@
 		if(error) {
 			gaim_connection_error(gc, _("Couldn't create socket"));
 		}
-		sip->connecting = 1;
+		sip->connecting = TRUE;
 	}
 	if(sip->sendlater) {
 		gchar *old = sip->sendlater;
 		sip->sendlater = g_strdup_printf("%s\r\n%s",old, buf);
+		g_free(old);
 	} else {
 		sip->sendlater = g_strdup(buf);
 	}
--- a/src/protocols/simple/simple.h	Sat Jan 28 01:35:58 2006 +0000
+++ b/src/protocols/simple/simple.h	Sat Jan 28 05:15:48 2006 +0000
@@ -79,7 +79,7 @@
 	GHashTable *buddies;
 	guint registertimeout;
 	guint resendtimeout;
-	int connecting;
+	gboolean connecting;
 	GaimAccount *account;
 	gchar *sendlater;
 	gchar *regcallid;