gaim/gaim

15b67e363989
Parents 65cee4f4c9ac
Children 791780c7c0f6
Fix some minor leaks when something goes wrong connecting to IRC
--- a/src/protocols/irc/irc.c Thu May 05 22:41:02 2005 -0400
+++ b/src/protocols/irc/irc.c Sat May 07 09:08:02 2005 -0400
@@ -270,6 +270,7 @@
buf = irc_format(irc, "vv", "PASS", gc->account->password);
if (irc_send(irc, buf) < 0) {
gaim_connection_error(gc, "Error sending password");
+ g_free(buf);
return;
}
g_free(buf);
@@ -283,12 +284,14 @@
strlen(realname) ? realname : IRC_DEFAULT_ALIAS);
if (irc_send(irc, buf) < 0) {
gaim_connection_error(gc, "Error registering with server");
+ g_free(buf);
return;
}
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;
}
g_free(buf);