mirror of
https://github.com/curl/curl.git
synced 2026-08-24 21:43:32 +03:00
ftp wildcard: segfault due to init only in multi_perform
The proper FTP wildcard init is now more properly done in Curl_pretransfer() and the corresponding cleanup in Curl_close(). The previous place of init/cleanup code made the internal pointer to be NULL when this feature was used with the multi_socket() API, as it was made within the curl_multi_perform() function. Reported-by: Jonathan Cardoso Machado Fixes #800
This commit is contained in:
parent
e1372418cd
commit
cba9621342
3 changed files with 16 additions and 15 deletions
|
|
@ -484,6 +484,12 @@ CURLcode Curl_close(struct SessionHandle *data)
|
|||
Curl_share_unlock(data, CURL_LOCK_DATA_SHARE);
|
||||
}
|
||||
|
||||
if(data->set.wildcardmatch) {
|
||||
/* destruct wildcard structures if it is needed */
|
||||
struct WildcardData *wc = &data->wildcard;
|
||||
Curl_wildcard_dtor(wc);
|
||||
}
|
||||
|
||||
Curl_freeset(data);
|
||||
free(data);
|
||||
return CURLE_OK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue