diff src/protocols/simple/simple.c @ 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 8e3b85fe4a55
children 7768cfa2e67e
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);
 	}