mirror of
https://github.com/curl/curl.git
synced 2026-08-26 16:03:33 +03:00
doh: fix cleanup
When removing an easy handle that had DoH sub-easy handles going, those were not removed from the multi handle. Their memory was reclaimed on curl_easy_cleanup() of the owning handle, but multi still had them in their list. Add `Curl_doh_close()` and `Curl_doh_cleanup()` as common point for handling the DoH resource management. Use the `multi` present in the doh handles (if so), for removal, as the `data->multi` might already have been NULLed at this time. Reported-by: 罗朝辉 Fixes #14207 Closes #14212
This commit is contained in:
parent
5eba0a4b37
commit
d8696dc8c0
4 changed files with 37 additions and 24 deletions
|
|
@ -2799,6 +2799,9 @@ CURLMcode curl_multi_cleanup(struct Curl_multi *multi)
|
|||
/* First remove all remaining easy handles */
|
||||
data = multi->easyp;
|
||||
while(data) {
|
||||
if(!GOOD_EASY_HANDLE(data))
|
||||
return CURLM_BAD_HANDLE;
|
||||
|
||||
nextdata = data->next;
|
||||
if(!data->state.done && data->conn)
|
||||
/* if DONE was never called for this handle */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue