aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sslgen.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sslgen.c b/lib/sslgen.c
index c3d4ee401..2d61960cb 100644
--- a/lib/sslgen.c
+++ b/lib/sslgen.c
@@ -384,6 +384,9 @@ CURLcode Curl_ssl_addsessionid(struct connectdata *conn,
store->sessionid = ssl_sessionid;
store->idsize = idsize;
store->age = data->state.sessionage; /* set current age */
+ if (store->name)
+ /* free it if there's one already present */
+ free(store->name)
store->name = clone_host; /* clone host name */
store->remote_port = conn->remote_port; /* port number */