src/irc.c
changeset 12 213c3d4abc66
parent 11 a769385a59c6
child 13 d3554afaa768
--- a/src/irc.c
+++ b/src/irc.c
@@ -142,12 +142,18 @@
 
 static char *irc_getmessage (const char *line, MSG * message)
 {
+    static char *garbage_collector = NULL;
     char *theLine;
     char *token;
     char *ptr;
 
+    if (garbage_collector != NULL)
+        free (garbage_collector);
+
     if ((theLine = strdup (line)) == NULL)
         return "ENOMEM";
+    else
+        garbage_collector = theLine;
 
     message->user = message->email = NULL;
     message->command = NULL;