]> jfr.im git - irc/quakenet/newserv.git/blobdiff - parser/parser.c
fix sstring leak
[irc/quakenet/newserv.git] / 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);
 }