From fc1d1ea93472985c12a4e3ae892a416de00d032e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 24 Dec 2007 23:45:48 +0000 Subject: Gary Maxwell filed bug report #1856628 (http://curl.haxx.se/bug/view.cgi?id=1856628) and provided a fix for the (small) memory leak in the SSL session ID caching code. It happened when a previous entry in the cache was re-used. --- lib/sslgen.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') 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 */ -- cgit v1.2.3