fixed memleaks in http tests
diff --git a/http/mime_type.c b/http/mime_type.c
index b291d20..1749c67 100644
--- a/http/mime_type.c
+++ b/http/mime_type.c
@@ -80,6 +80,7 @@ bool http_mime_type_buf_parse_type (s_buf *buf)
if ((r = buf_read_until_space_into_str(buf, &str)) <= 0)
return false;
type = str_to_sym(&str);
+ str_clean(&str);
while (1) {
if ((r = buf_ignore_spaces(buf)) <= 0)
return false;
@@ -105,6 +106,7 @@ bool http_mime_type_buf_parse_type (s_buf *buf)
buf_save_clean(buf, &save);
if (r > 0) {
tag_init_sym(&ext, str_to_sym(&str));
+ str_clean(&str);
if (! http_mime_type_def(&ext, &type))
return false;
}
diff --git a/test/inspect_test.c b/test/inspect_test.c
index 8b27b99..db0026c 100644
--- a/test/inspect_test.c
+++ b/test/inspect_test.c
@@ -153,6 +153,7 @@
TEST_EQ(inspect_struct(&struct_test, &result), &result); \
TEST_STRNCMP(result.ptr.p, (expected), result.size); \
str_clean(&result); \
+ struct_clean(&struct_test); \
test_context(NULL); \
} while (0)