Update of /cvsroot/gaim/gaim/src/protocols/irc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12932
Modified Files:
irc.c
Log Message:
Fix some minor leaks when something goes wrong connecting to IRC
Index: irc.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/protocols/irc/irc.c,v
retrieving revision 1.255
retrieving revision 1.256
diff -u -d -p -r1.255 -r1.256
--- irc.c 26 Mar 2005 23:25:14 -0000 1.255
+++ irc.c 7 May 2005 13:08:21 -0000 1.256
@@ -292,6 +292,7 @@ static gboolean do_login(GaimConnection
buf = irc_format(irc, "vv", "PASS", pass);
if (irc_send(irc, buf) < 0) {
gaim_connection_error(gc, "Error sending password");
+ g_free(buf);
return FALSE;
}
g_free(buf);
@@ -305,12 +306,14 @@ static gboolean do_login(GaimConnection
strlen(realname) ? realname : IRC_DEFAULT_ALIAS);
if (irc_send(irc, buf) < 0) {
gaim_connection_error(gc, "Error registering with server");
+ g_free(buf);
return FALSE;
}
g_free(buf);
buf = irc_format(irc, "vn", "NICK", gaim_connection_get_display_name(gc));
if (irc_send(irc, buf) < 0) {
gaim_connection_error(gc, "Error sending nickname");
+ g_free(buf);
return FALSE;
}
g_free(buf);
|