Skip to content
Snippets Groups Projects
Commit 86da31e0 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Curl_SSL_Close_All() now checks that we have a session cache before we run

around killing entries in it!
parent 1d7075e3
No related branches found
No related tags found
No related merge requests found
......@@ -412,13 +412,15 @@ static int Kill_Single_Session(struct curl_ssl_session *session)
int Curl_SSL_Close_All(struct SessionHandle *data)
{
int i;
for(i=0; i< data->set.ssl.numsessions; i++)
/* the single-killer function handles empty table slots */
Kill_Single_Session(&data->set.ssl.session[i]);
/* free the cache data */
free(data->set.ssl.session);
if(data->set.ssl.session) {
for(i=0; i< data->set.ssl.numsessions; i++)
/* the single-killer function handles empty table slots */
Kill_Single_Session(&data->set.ssl.session[i]);
/* free the cache data */
free(data->set.ssl.session);
}
return 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment