prevent memory leak when built SSL disabled

This commit is contained in:
Daniel Stenberg 2005-05-04 14:52:51 +00:00
parent 7dde3d1825
commit 2179e6e797

View File

@ -499,6 +499,7 @@ int Curl_ssl_recv(struct connectdata *conn, /* connection data */
*/
CURLcode Curl_ssl_initsessions(struct SessionHandle *data, long amount)
{
#ifdef USE_SSL
struct curl_ssl_session *session;
if(data->state.session)
@ -517,6 +518,11 @@ CURLcode Curl_ssl_initsessions(struct SessionHandle *data, long amount)
data->set.ssl.numsessions = amount;
data->state.session = session;
data->state.sessionage = 1; /* this is brand new */
#else
/* without SSL, do nothing */
(void)data;
(void)amount;
#endif
return CURLE_OK;
}