Blame SOURCES/0076-curl-7.29.0-HTTP-proxy-deny-use-after-free.patch

4a0036
From 4f20188ac644afe174be6005ef4f6ffba232b8b2 Mon Sep 17 00:00:00 2001
4a0036
From: Daniel Stenberg <daniel@haxx.se>
4a0036
Date: Mon, 19 Dec 2022 08:38:37 +0100
4a0036
Subject: [PATCH] smb/telnet: do not free the protocol struct in *_done()
4a0036
4a0036
It is managed by the generic layer.
4a0036
4a0036
Reported-by: Trail of Bits
4a0036
4a0036
Closes #10112
4a0036
---
4a0036
 lib/smb.c    | 14 ++------------
4a0036
 lib/telnet.c |  3 ---
4a0036
 2 files changed, 2 insertions(+), 15 deletions(-)
4a0036
4a0036
diff --git a/lib/telnet.c b/lib/telnet.c
4a0036
index 24d3f1efb14c8..22bc81e755222 100644
4a0036
--- a/lib/telnet.c
4a0036
+++ b/lib/telnet.c
4a0036
@@ -1248,9 +1248,6 @@ static CURLcode telnet_done(struct Curl_easy *data,
4a0036
 
4a0036
   curl_slist_free_all(tn->telnet_vars);
4a0036
   tn->telnet_vars = NULL;
4a0036
-
4a0036
-  Curl_safefree(conn->data->state.proto.telnet);
4a0036
-
4a0036
   return CURLE_OK;
4a0036
 }
4a0036