mirror of
https://github.com/moparisthebest/curl
synced 2025-03-11 07:39:50 -04:00
Curl_SSL_Close_All() now checks that we have a session cache before we run
around killing entries in it!
This commit is contained in:
parent
1d7075e339
commit
86da31e031
14
lib/ssluse.c
14
lib/ssluse.c
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user