From 2179e6e797de0cb577612b7929f4d520caf74350 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 4 May 2005 14:52:51 +0000 Subject: [PATCH] prevent memory leak when built SSL disabled --- lib/sslgen.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; }