Mercurial > pidgin
changeset 10903:c153119be7d0
[gaim-migrate @ 12630]
Fix some minor leaks when something goes wrong connecting to IRC
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sat, 07 May 2005 13:08:21 +0000 |
parents | acaf64c659b9 |
children | e0cf11160c97 |
files | src/protocols/irc/irc.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/irc/irc.c Fri May 06 00:14:30 2005 +0000 +++ b/src/protocols/irc/irc.c Sat May 07 13:08:21 2005 +0000 @@ -292,6 +292,7 @@ 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 @@ 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);