aboutsummaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-05-15 00:37:36 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-05-15 00:37:36 +0200
commitcba962134256e8b17c70dbb543ffcf935d2a53e4 (patch)
treed23311120c5695cd72fc98764c4052cb1536bbf2 /lib/multi.c
parente1372418cdf49fc46f284387c6abf0649df6cda0 (diff)
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
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/multi.c b/lib/multi.c
index ffc422c40..7e2725bab 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -2116,27 +2116,12 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
data=multi->easyp;
while(data) {
CURLMcode result;
- struct WildcardData *wc = &data->wildcard;
SIGPIPE_VARIABLE(pipe_st);
- if(data->set.wildcardmatch) {
- if(!wc->filelist) {
- CURLcode ret = Curl_wildcard_init(wc); /* init wildcard structures */
- if(ret)
- return CURLM_OUT_OF_MEMORY;
- }
- }
-
sigpipe_ignore(data, &pipe_st);
result = multi_runsingle(multi, now, data);
sigpipe_restore(&pipe_st);
- if(data->set.wildcardmatch) {
- /* destruct wildcard structures if it is needed */
- if(wc->state == CURLWC_DONE || result)
- Curl_wildcard_dtor(wc);
- }
-
if(result)
returncode = result;