]> jfr.im git - irc/quakenet/newserv.git/commitdiff
fix sstring leak
authorPaul <redacted>
Sat, 2 Aug 2008 10:51:53 +0000 (11:51 +0100)
committerPaul <redacted>
Sat, 2 Aug 2008 10:51:53 +0000 (11:51 +0100)
parser/parser.c

index 76d9e3a4230266cd79bb918a062a2e05fe380821..5ad49570923525f3a6128b20773a3465d3d1f96e 100644 (file)
@@ -45,7 +45,14 @@ void destroycommandtree(CommandTree *ct) {
       destroycommandtree((CommandTree *)ct->next[i]);
     }
   }
-  
+
+  if(ct->cmd) {
+    if(ct->cmd->command)
+      freesstring(ct->cmd->command);
+    if(ct->cmd->help)
+      free(ct->cmd->help);
+    free(ct->cmd);
+  } 
   free(ct);
 }