summaryrefslogtreecommitdiff
path: root/tests/unit/plugins/relay
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-02-18 23:12:56 +0100
committerSébastien Helleu <flashcode@flashtux.org>2024-02-18 23:12:56 +0100
commit9b9b36bb02c3609a44ef91cc70f3bca20b71ec56 (patch)
tree4dc7fe283af1dddb58473fb7a01832b70f5422d8 /tests/unit/plugins/relay
parentc4ac9046b29c264d1eb12a614f7c74cb08fd224a (diff)
downloadweechat-9b9b36bb02c3609a44ef91cc70f3bca20b71ec56.zip
tests: fix free of HTTP request
Diffstat (limited to 'tests/unit/plugins/relay')
-rw-r--r--tests/unit/plugins/relay/test-relay-http.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/unit/plugins/relay/test-relay-http.cpp b/tests/unit/plugins/relay/test-relay-http.cpp
index e5edb74b8..243173442 100644
--- a/tests/unit/plugins/relay/test-relay-http.cpp
+++ b/tests/unit/plugins/relay/test-relay-http.cpp
@@ -317,7 +317,7 @@ TEST(RelayHttp, ParseMethodPath)
LONGS_EQUAL(0, request->content_length);
LONGS_EQUAL(0, request->body_size);
POINTERS_EQUAL(NULL, request->body);
- free (request);
+ relay_http_request_free (request);
request = relay_http_request_alloc ();
CHECK(request);
@@ -334,7 +334,7 @@ TEST(RelayHttp, ParseMethodPath)
LONGS_EQUAL(0, request->content_length);
LONGS_EQUAL(0, request->body_size);
POINTERS_EQUAL(NULL, request->body);
- free (request);
+ relay_http_request_free (request);
request = relay_http_request_alloc ();
CHECK(request);
@@ -351,7 +351,7 @@ TEST(RelayHttp, ParseMethodPath)
LONGS_EQUAL(0, request->content_length);
LONGS_EQUAL(0, request->body_size);
POINTERS_EQUAL(NULL, request->body);
- free (request);
+ relay_http_request_free (request);
request = relay_http_request_alloc ();
CHECK(request);
@@ -370,7 +370,7 @@ TEST(RelayHttp, ParseMethodPath)
LONGS_EQUAL(0, request->content_length);
LONGS_EQUAL(0, request->body_size);
POINTERS_EQUAL(NULL, request->body);
- free (request);
+ relay_http_request_free (request);
request = relay_http_request_alloc ();
CHECK(request);
@@ -390,7 +390,7 @@ TEST(RelayHttp, ParseMethodPath)
LONGS_EQUAL(0, request->content_length);
LONGS_EQUAL(0, request->body_size);
POINTERS_EQUAL(NULL, request->body);
- free (request);
+ relay_http_request_free (request);
request = relay_http_request_alloc ();
CHECK(request);
@@ -416,7 +416,7 @@ TEST(RelayHttp, ParseMethodPath)
LONGS_EQUAL(0, request->content_length);
LONGS_EQUAL(0, request->body_size);
POINTERS_EQUAL(NULL, request->body);
- free (request);
+ relay_http_request_free (request);
}
/*
@@ -437,7 +437,7 @@ TEST(RelayHttp, ParseHeader)
"\n",
*(request->raw));
LONGS_EQUAL(0, request->headers->items_count);
- free (request);
+ relay_http_request_free (request);
request = relay_http_request_alloc ();
CHECK(request);
@@ -448,7 +448,7 @@ TEST(RelayHttp, ParseHeader)
"\n",
*(request->raw));
LONGS_EQUAL(0, request->headers->items_count);
- free (request);
+ relay_http_request_free (request);
request = relay_http_request_alloc ();
CHECK(request);
@@ -459,7 +459,7 @@ TEST(RelayHttp, ParseHeader)
"Test\n",
*(request->raw));
LONGS_EQUAL(0, request->headers->items_count);
- free (request);
+ relay_http_request_free (request);
request = relay_http_request_alloc ();
CHECK(request);
@@ -471,7 +471,7 @@ TEST(RelayHttp, ParseHeader)
*(request->raw));
LONGS_EQUAL(1, request->headers->items_count);
STRCMP_EQUAL("value", (const char *)hashtable_get (request->headers, "x-test"));
- free (request);
+ relay_http_request_free (request);
request = relay_http_request_alloc ();
CHECK(request);
@@ -488,7 +488,7 @@ TEST(RelayHttp, ParseHeader)
CHECK(hashtable_has_key (request->accept_encoding, "gzip"));
CHECK(hashtable_has_key (request->accept_encoding, "zstd"));
CHECK(hashtable_has_key (request->accept_encoding, "br"));
- free (request);
+ relay_http_request_free (request);
request = relay_http_request_alloc ();
CHECK(request);
@@ -500,7 +500,7 @@ TEST(RelayHttp, ParseHeader)
*(request->raw));
LONGS_EQUAL(1, request->headers->items_count);
LONGS_EQUAL(123, request->content_length);
- free (request);
+ relay_http_request_free (request);
/* websocket request */
request = relay_http_request_alloc ();
@@ -523,7 +523,7 @@ TEST(RelayHttp, ParseHeader)
LONGS_EQUAL(15, request->ws_deflate->window_bits_inflate);
POINTERS_EQUAL(NULL, request->ws_deflate->strm_deflate);
POINTERS_EQUAL(NULL, request->ws_deflate->strm_inflate);
- free (request);
+ relay_http_request_free (request);
}
/*
@@ -562,7 +562,7 @@ TEST(RelayHttp, AddToBody)
MEMCMP_EQUAL("abcdefghij", request->body, 10);
POINTERS_EQUAL(NULL, partial_message);
- free (request);
+ relay_http_request_free (request);
request = relay_http_request_alloc ();
CHECK(request);
@@ -590,7 +590,7 @@ TEST(RelayHttp, AddToBody)
STRCMP_EQUAL("fghij", partial_message);
free (partial_message);
- free (request);
+ relay_http_request_free (request);
}
/*