aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-05-04 14:52:51 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-05-04 14:52:51 +0000
commit2179e6e797de0cb577612b7929f4d520caf74350 (patch)
tree1526e724658c272927462e72211a0bc82a02ef25
parent7dde3d1825547ab22f38210748d8b12d30fbc926 (diff)
prevent memory leak when built SSL disabled
-rw-r--r--lib/sslgen.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sslgen.c b/lib/sslgen.c
index e7f0011b2..5e8f75332 100644
--- a/lib/sslgen.c
+++ b/lib/sslgen.c
@@ -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;
}