diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-03-16 09:33:27 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-03-16 09:33:27 +0100 |
commit | da754b82ae4c6ccc18cda52a30771ba01aa0b2d8 (patch) | |
tree | 338cc6b62aa79b3770edc32a4041906b4dbdd9d4 | |
parent | 2eba5e4c7bf28bb5a98a6b1f55ad5fae3b27492c (diff) | |
download | curl-da754b82ae4c6ccc18cda52a30771ba01aa0b2d8.tar.gz |
tool_operate: fix add_parallel_transfers when more are in queuebagder/parallel-stall
Trying to return early from the funtion if no new transfers were added
would break the "morep" argument and cause issues. This could to zero
content "transfers" (within quotes since they would never be started)
when parallel-max was reduced.
Reported-by: Gavin Wong
Analyzed-by: Jay Satiro
Fixes #4937
-rw-r--r-- | src/tool_operate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c index 4b3caa80c..ab06b71c5 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -2055,7 +2055,7 @@ static CURLcode add_parallel_transfers(struct GlobalConfig *global, *addedp = FALSE; *morep = FALSE; result = create_transfer(global, share, addedp); - if(result || !*addedp) + if(result) return result; for(per = transfers; per && (all_added < global->parallel_max); per = per->next) { |