/* Allocate the contents */
contents = strdup(contp+1);
+ if(!contents) {
+ fprintf(stderr, "out of memory\n");
+ return 1;
+ }
contp = contents;
if('@' == contp[0]) {
(config->errors?config->errors:stderr):NULL);
if(res != CURLE_OK) {
clean_getout(config);
+ if(outfiles)
+ free(outfiles);
break;
}
}
/* Create the directory hierarchy, if not pre-existant to a multiple
file output call */
- if(config->create_dirs)
- if (-1 == create_dir_hierarchy(outfile)) {
- return CURLE_WRITE_ERROR;
- }
+ if(config->create_dirs &&
+ (-1 == create_dir_hierarchy(outfile)))
+ return CURLE_WRITE_ERROR;
if(config->resume_from_current) {
/* We're told to continue from where we are now. Get the