about summary refs log tree commit homepage
path: root/ext/http11/tst_cleanup.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/http11/tst_cleanup.c')
-rw-r--r--ext/http11/tst_cleanup.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/http11/tst_cleanup.c b/ext/http11/tst_cleanup.c
new file mode 100644
index 0000000..b574f9f
--- /dev/null
+++ b/ext/http11/tst_cleanup.c
@@ -0,0 +1,24 @@
+
+#include "tst.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+void tst_cleanup(struct tst *tst)
+{
+   struct node_lines *current_line;
+   struct node_lines *next_line;
+
+   next_line = tst->node_lines;
+
+   do
+   {
+      current_line = next_line;
+      next_line = current_line->next;
+      free(current_line->node_line);
+      free(current_line);
+   }
+   while(next_line != NULL);
+
+   free(tst);
+}
+