summaryrefslogtreecommitdiff
path: root/src/tool_urlglob.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-09-23 17:11:22 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-10-02 07:50:32 +0200
commite59371a4936f8e7e2187b09a08d34d9a4c278657 (patch)
tree42dd007c9b136a2282605373a06f23409a3b6941 /src/tool_urlglob.c
parentc124e6b3c04bfd254e24312bc66c2bc9db919442 (diff)
downloadcurl-e59371a4936f8e7e2187b09a08d34d9a4c278657.tar.gz
curl: create easy handles on-demand and not ahead of time
This should again enable crazy-large download ranges of the style [1-10000000] that otherwise easily ran out of memory starting in 7.66.0 when this new handle allocating scheme was introduced. Reported-by: Peter Sumatra Fixes #4393 Closes #4438
Diffstat (limited to 'src/tool_urlglob.c')
-rw-r--r--src/tool_urlglob.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c
index d6f7104ac..450cdcf32 100644
--- a/src/tool_urlglob.c
+++ b/src/tool_urlglob.c
@@ -488,6 +488,9 @@ void glob_cleanup(URLGlob* glob)
size_t i;
int elem;
+ if(!glob)
+ return;
+
for(i = 0; i < glob->size; i++) {
if((glob->pattern[i].type == UPTSet) &&
(glob->pattern[i].content.Set.elements)) {