From cd1c611b24eed0b3eebda52d445b55c6b4a2945f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 11 May 2023 09:56:51 +0200 Subject: [PATCH] headers: clear (possibly) lingering pointer in init The "prevhead" pointer is used for the headers storage but was not cleared correctly in init, which made it possible to act up when a handle is reused. Reported-by: Steve Herrell Fixes #11101 Closes #11103 --- lib/headers.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/headers.c b/lib/headers.c index 6cd7e31703..457ed63eda 100644 --- a/lib/headers.c +++ b/lib/headers.c @@ -336,6 +336,7 @@ CURLcode Curl_headers_push(struct Curl_easy *data, const char *header, static void headers_init(struct Curl_easy *data) { Curl_llist_init(&data->state.httphdrs, NULL); + data->state.prevhead = NULL; } /*