From 75a4b85ea060c5b63e9742ee9d1591bd618ba5c2 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Fri, 14 Jul 2006 11:25:48 +0200 Subject: Fixed a memory leak, added a check for valid Jabber handles, and updated documentation (added information about "account set" and sorted the list of settings because it was a bit too random). --- root_commands.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'root_commands.c') diff --git a/root_commands.c b/root_commands.c index 2cf67134..389266eb 100644 --- a/root_commands.c +++ b/root_commands.c @@ -376,6 +376,7 @@ static void cmd_account( irc_t *irc, char **cmd ) if( a == NULL ) { + g_free( acc_handle ); irc_usermsg( irc, "Invalid account" ); return; } @@ -386,11 +387,13 @@ static void cmd_account( irc_t *irc, char **cmd ) if( a->gc && s && s->flags & ACC_SET_OFFLINE_ONLY ) { + g_free( acc_handle ); irc_usermsg( irc, "This setting can only be changed when the account is %s-line", "off" ); return; } else if( !a->gc && s && s->flags & ACC_SET_ONLINE_ONLY ) { + g_free( acc_handle ); irc_usermsg( irc, "This setting can only be changed when the account is %s-line", "on" ); return; } -- cgit v1.2.3