diff options
author | Quinn Slack <sqs@cs.stanford.edu> | 2011-01-10 13:53:01 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2011-01-10 13:53:57 +0100 |
commit | 1238edaeaf947b896aafd9ddffc8430dea179c3a (patch) | |
tree | 837a4c68d75cf9447a67c29cf6b8f49d6691c9cb /lib/sslgen.c | |
parent | a9cd4f4ed49e1a0b79f8fc6a0cb129331fa04f23 (diff) | |
download | curl-1238edaeaf947b896aafd9ddffc8430dea179c3a.tar.gz |
SSL: fix memory leak
In OOM situation. Follow-up fix to commit a9cd4f4ed49e1a0.
Diffstat (limited to 'lib/sslgen.c')
-rw-r--r-- | lib/sslgen.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sslgen.c b/lib/sslgen.c index 9ee3ab1d8..c1a8a3073 100644 --- a/lib/sslgen.c +++ b/lib/sslgen.c @@ -350,8 +350,11 @@ CURLcode Curl_ssl_addsessionid(struct connectdata *conn, store->name = clone_host; /* clone host name */ store->remote_port = conn->remote_port; /* port number */ - if(!Curl_clone_ssl_config(&conn->ssl_config, &store->ssl_config)) + if(!Curl_clone_ssl_config(&conn->ssl_config, &store->ssl_config)) { + store->sessionid = NULL; /* let caller free sessionid */ + free(clone_host); return CURLE_OUT_OF_MEMORY; + } return CURLE_OK; } |