mirror of
https://github.com/moparisthebest/curl
synced 2025-03-11 07:39:50 -04:00
bugfix for when more -o than URLs is used
This commit is contained in:
parent
4792eee5d0
commit
b137d5ec23
14
src/main.c
14
src/main.c
@ -1532,9 +1532,21 @@ operate(struct Configurable *config, int argc, char *argv[])
|
||||
/* loop through the list of given URLs */
|
||||
while(urlnode) {
|
||||
|
||||
/* get the full URL */
|
||||
/* get the full URL (it might be NULL) */
|
||||
url=urlnode->url;
|
||||
|
||||
if(NULL == url) {
|
||||
/* This node had no URL, skip it and continue to the next */
|
||||
if(urlnode->outfile)
|
||||
free(urlnode->outfile);
|
||||
|
||||
/* move on to the next URL */
|
||||
nextnode=urlnode->next;
|
||||
free(urlnode); /* free the node */
|
||||
urlnode = nextnode;
|
||||
continue; /* next please */
|
||||
}
|
||||
|
||||
/* default output stream is stdout */
|
||||
outs.stream = stdout;
|
||||
outs.config = config;
|
||||
|
Loading…
x
Reference in New Issue
Block a user