struct State *state = &config->state;
/* Free list of remaining URLs */
glob_cleanup(&state->urls);
- tool_safefree(state->outfiles);
+ state->outfiles = NULL;
tool_safefree(state->uploadfile);
/* Free list of globbed upload files */
glob_cleanup(&state->inglob);
struct State *state = &config->state;
warnf(config->global, "Failed creating file for saving etags: \"%s\". "
"Skip this transfer", config->etag_save_file);
- tool_safefree(state->outfiles);
+ state->outfiles = NULL;
glob_cleanup(&state->urls);
*skip = TRUE;
return CURLE_OK;
}
/* save outfile pattern before expansion */
- if(urlnode->outfile && !state->outfiles) {
- state->outfiles = strdup(urlnode->outfile);
- if(!state->outfiles) {
- errorf(global, "out of memory");
- result = CURLE_OUT_OF_MEMORY;
- break;
- }
- }
+ if(urlnode->outfile && !state->outfiles)
+ state->outfiles = urlnode->outfile;
if(!config->globoff && urlnode->infile && !state->inglob) {
/* Unless explicitly shut off */
glob_cleanup(&state->urls);
state->urlnum = 0;
- tool_safefree(state->outfiles);
+ state->outfiles = NULL;
tool_safefree(state->uploadfile);
/* Free list of globbed upload files */
glob_cleanup(&state->inglob);
}
break;
}
- tool_safefree(state->outfiles);
+ state->outfiles = NULL;
fail:
if(!*added || result) {
*added = FALSE;