--- a/src/irc.c +++ b/src/irc.c @@ -252,8 +252,10 @@ return NULL; #endif case ENOMEM: + return "ENOMEM"; case ERROR: - return command; + free (command); + return "ERROR"; case VERSION: if ((ptr = strchr (message->user, ' '))) *ptr = '\0';