-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Static analysis shows that return value of the function call to curl_multi_add_handle in function add_to_curlm is not handled properly.
Lines 448 to 459 in 2f7df2d
| static void add_to_curlm(md_http_request_t *req, CURLM *curlm) | |
| { | |
| md_curl_internals_t *internals = req->internals; | |
| assert(curlm); | |
| assert(internals); | |
| if (internals->curlm == NULL) { | |
| internals->curlm = curlm; | |
| } | |
| assert(internals->curlm == curlm); | |
| curl_multi_add_handle(curlm, internals->curl); | |
| } |
Return codes should probably be forwarded by add_to_curlm and handled in the calling-scope in function md_curl_multi_perform alongside other errors.
Lines 527 to 539 in 2f7df2d
| if (APR_SUCCESS != (rv = internals_setup(req))) { | |
| if (req->cb.on_status) req->cb.on_status(req, rv, req->cb.on_status_data); | |
| md_log_perror(MD_LOG_MARK, MD_LOG_TRACE3, rv, p, | |
| "multi_perform[%d reqs]: setup failed", requests->nelts); | |
| APR_ARRAY_PUSH(http_spares, md_http_t*) = sub_http; | |
| goto leave; | |
| } | |
| APR_ARRAY_PUSH(requests, md_http_request_t*) = req; | |
| add_to_curlm(req, curlm); | |
| md_log_perror(MD_LOG_MARK, MD_LOG_TRACE3, rv, p, | |
| "multi_perform[%d reqs]: added request", requests->nelts); | |
| } |
Metadata
Metadata
Assignees
Labels
No labels