From 926c7eaf55c2eb2fdf578700b73f964e4f7a4872 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 30 Jul 2026 09:39:19 +0200 Subject: [PATCH] Revert "lib5004.c try memleak fix" This reverts commit 770f9a798143e6cf58b67c4646464877b721feb9. --- tests/libtest/lib5004.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/libtest/lib5004.c b/tests/libtest/lib5004.c index 33945e867f..1f6fb1a223 100644 --- a/tests/libtest/lib5004.c +++ b/tests/libtest/lib5004.c @@ -57,11 +57,12 @@ static CURLcode test_lib5004(const char *URL) "date: method path authority content-type: content-length:"); easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"hello\": \"world\"}"); - headers = curl_slist_append(NULL, "Date: Tue, 20 Apr 2021 02:07:55 GMT"); - if(!headers) - goto test_cleanup; - curl_slist_append(headers, "Content-Type: application/json"); - curl_slist_append(headers, "Content-Length: 18"); + headers = curl_slist_append(headers, + "Date: Tue, 20 Apr 2021 02:07:55 GMT"); + headers = curl_slist_append(headers, + "Content-Type: application/json"); + headers = curl_slist_append(headers, + "Content-Length: 18"); easy_setopt(curl, CURLOPT_HTTPHEADER, headers); easy_setopt(curl, CURLOPT_HEADER, 0L);