Static analysis shows that return value of the function call to curl_multi_add_handle in function add_to_curlm is not handled properly.
|
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.
|
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); |
|
} |
Static analysis shows that return value of the function call to
curl_multi_add_handlein functionadd_to_curlmis not handled properly.mod_md/src/md_curl.c
Lines 448 to 459 in 2f7df2d
Return codes should probably be forwarded by
add_to_curlmand handled in the calling-scope in functionmd_curl_multi_performalongside other errors.mod_md/src/md_curl.c
Lines 527 to 539 in 2f7df2d