aboutsummaryrefslogtreecommitdiffstats
path: root/irc_commands.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2009-10-04 20:00:53 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2009-10-04 20:00:53 +0100
commite59b4f65183a7bee638312a0c96e3d0607cb181f (patch)
treee7ac1c4b3e8e3d0d9c5acddb8ac37056f1cec64e /irc_commands.c
parentbdad4079b4bbc8209bf17c81cafbf699f8c6d90d (diff)
Fixed embarassing early free() bug that sat in the WATCH command handling
for *years*. I guess it took a while for IRC clients to actually use that functionality...
Diffstat (limited to 'irc_commands.c')
-rw-r--r--irc_commands.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/irc_commands.c b/irc_commands.c
index bdca5b24..044ff62c 100644
--- a/irc_commands.c
+++ b/irc_commands.c
@@ -414,8 +414,8 @@ static void irc_cmd_watch( irc_t *irc, char **cmd )
if( g_hash_table_lookup_extended( irc->watches, nick, &okey, &ovalue ) )
{
- g_free( okey );
g_hash_table_remove( irc->watches, okey );
+ g_free( okey );
irc_reply( irc, 602, "%s %s %s %d :%s", nick, "*", "*", 0, "Stopped watching" );
}