diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-12-24 23:45:48 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-12-24 23:45:48 +0000 |
commit | fc1d1ea93472985c12a4e3ae892a416de00d032e (patch) | |
tree | 3e7a2320ed346959a8c5743c03211df9898177ed /lib/sslgen.c | |
parent | 9cd30c20120888ce08276ed00a11e858e44ff3f4 (diff) |
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.
Diffstat (limited to 'lib/sslgen.c')
-rw-r--r-- | lib/sslgen.c | 3 |
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 */ |