Patrick Monnerat and I modified libcurl so that now it *copies* all strings
passed to it with curl_easy_setopt()! Previously it has always just refered to the data, forcing the user to keep the data around until libcurl is done with it. That is now history and libcurl will instead clone the given strings and keep private copies.
This commit is contained in:
19
lib/sslgen.c
19
lib/sslgen.c
@@ -135,20 +135,11 @@ Curl_clone_ssl_config(struct ssl_config_data *source,
|
||||
|
||||
void Curl_free_ssl_config(struct ssl_config_data* sslc)
|
||||
{
|
||||
if(sslc->CAfile)
|
||||
free(sslc->CAfile);
|
||||
|
||||
if(sslc->CApath)
|
||||
free(sslc->CApath);
|
||||
|
||||
if(sslc->cipher_list)
|
||||
free(sslc->cipher_list);
|
||||
|
||||
if(sslc->egdsocket)
|
||||
free(sslc->egdsocket);
|
||||
|
||||
if(sslc->random_file)
|
||||
free(sslc->random_file);
|
||||
Curl_safefree(sslc->CAfile);
|
||||
Curl_safefree(sslc->CApath);
|
||||
Curl_safefree(sslc->cipher_list);
|
||||
Curl_safefree(sslc->egdsocket);
|
||||
Curl_safefree(sslc->random_file);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user