Commit 255f2396d357f726e28cbb08819b853ba1ea93d4

Thomas de Grivel 2024-09-13T21:14:04

fix memleak

diff --git a/http/http_request.c b/http/http_request.c
index 43c0fab..fb86e4d 100644
--- a/http/http_request.c
+++ b/http/http_request.c
@@ -53,6 +53,7 @@ s_tag * http_request_buf_parse_method (s_buf *buf, s_tag *dest)
     tmp.type = TAG_STR;
     tmp.data.str = str;
     buf_save_clean(buf, &save);
+    tag_clean(&allowed_methods_tag);
     *dest = tmp;
     return dest;
   }
@@ -67,11 +68,13 @@ s_tag * http_request_buf_parse_method (s_buf *buf, s_tag *dest)
                  tmp.data.sym->str.ptr.pchar);
   }
   buf_save_clean(buf, &save);
+  tag_clean(&allowed_methods_tag);
   *dest = tmp;
   return dest;
  restore:
   buf_save_restore_rpos(buf, &save);
   buf_save_clean(buf, &save);
+  tag_clean(&allowed_methods_tag);
   return NULL;
 }