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.
This commit is contained in:
Daniel Stenberg
2007-12-24 23:45:48 +00:00
parent 9cd30c2012
commit fc1d1ea934
3 changed files with 11 additions and 1 deletions

View File

@@ -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 */