diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pipeline.c | 9 | ||||
-rw-r--r-- | lib/url.c | 16 |
2 files changed, 14 insertions, 11 deletions
diff --git a/lib/pipeline.c b/lib/pipeline.c index e4400fdde..95b89b54b 100644 --- a/lib/pipeline.c +++ b/lib/pipeline.c @@ -323,10 +323,11 @@ CURLMcode Curl_pipeline_set_server_blacklist(char **servers, static bool pipe_head(struct SessionHandle *data, struct curl_llist *pipeline) { - struct curl_llist_element *curr = pipeline->head; - if(curr) - return (curr->ptr == data) ? TRUE : FALSE; - + if(pipeline) { + struct curl_llist_element *curr = pipeline->head; + if(curr) + return (curr->ptr == data) ? TRUE : FALSE; + } return FALSE; } @@ -2868,15 +2868,17 @@ static bool IsPipeliningPossible(const struct SessionHandle *handle, int Curl_removeHandleFromPipeline(struct SessionHandle *handle, struct curl_llist *pipeline) { - struct curl_llist_element *curr; + if(pipeline) { + struct curl_llist_element *curr; - curr = pipeline->head; - while(curr) { - if(curr->ptr == handle) { - Curl_llist_remove(pipeline, curr, NULL); - return 1; /* we removed a handle */ + curr = pipeline->head; + while(curr) { + if(curr->ptr == handle) { + Curl_llist_remove(pipeline, curr, NULL); + return 1; /* we removed a handle */ + } + curr = curr->next; } - curr = curr->next; } return 0; |