about summary refs log tree commit homepage
path: root/ext/http11/tst_cleanup.c
diff options
context:
space:
mode:
authorevanweaver <evanweaver@19e92222-5c0b-0410-8929-a290d50e31e9>2007-10-26 02:59:15 +0000
committerevanweaver <evanweaver@19e92222-5c0b-0410-8929-a290d50e31e9>2007-10-26 02:59:15 +0000
commitd4ff84b8d3afa45a69c23eb18899194bf7219140 (patch)
tree4a8e4b4e36ea36a8f543bfaaa2e6ec50fa1e94b6 /ext/http11/tst_cleanup.c
parent4ff4a7d915f01dabcb87125aa89159fcc5d48534 (diff)
downloadunicorn-d4ff84b8d3afa45a69c23eb18899194bf7219140.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@741 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'ext/http11/tst_cleanup.c')
-rw-r--r--ext/http11/tst_cleanup.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/http11/tst_cleanup.c b/ext/http11/tst_cleanup.c
new file mode 100644
index 0000000..a85491d
--- /dev/null
+++ b/ext/http11/tst_cleanup.c
@@ -0,0 +1,23 @@
+
+#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);
+}