Blob Blame History Raw
From 4f20188ac644afe174be6005ef4f6ffba232b8b2 Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Mon, 19 Dec 2022 08:38:37 +0100
Subject: [PATCH] smb/telnet: do not free the protocol struct in *_done()

It is managed by the generic layer.

Reported-by: Trail of Bits

Closes #10112
---
 lib/smb.c    | 14 ++------------
 lib/telnet.c |  3 ---
 2 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/lib/telnet.c b/lib/telnet.c
index 24d3f1efb14c8..22bc81e755222 100644
--- a/lib/telnet.c
+++ b/lib/telnet.c
@@ -1248,9 +1248,6 @@ static CURLcode telnet_done(struct Curl_easy *data,
 
   curl_slist_free_all(tn->telnet_vars);
   tn->telnet_vars = NULL;
-
-  Curl_safefree(conn->data->state.proto.telnet);
-
   return CURLE_OK;
 }