mirror of
https://github.com/curl/curl.git
synced 2026-08-24 11:13:39 +03:00
easy_getinfo: check magic, Curl_close safety
Check the easy handles magic in calls to curl_easy_getinfo(). In Curl_close() clear the magic after DNS shutdown since we'd like to see tracing for this. When clearing the magic, also clear the verbose flag so we no longer call DEBUGFUNCTION on such a handle. Closes #18511
This commit is contained in:
parent
f4758cd524
commit
80ac5fb2ec
2 changed files with 16 additions and 10 deletions
|
|
@ -877,12 +877,16 @@ void curl_easy_cleanup(CURL *ptr)
|
|||
* information from a performed transfer and similar.
|
||||
*/
|
||||
#undef curl_easy_getinfo
|
||||
CURLcode curl_easy_getinfo(CURL *data, CURLINFO info, ...)
|
||||
CURLcode curl_easy_getinfo(CURL *easy, CURLINFO info, ...)
|
||||
{
|
||||
struct Curl_easy *data = easy;
|
||||
va_list arg;
|
||||
void *paramp;
|
||||
CURLcode result;
|
||||
|
||||
if(!GOOD_EASY_HANDLE(data))
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
|
||||
va_start(arg, info);
|
||||
paramp = va_arg(arg, void *);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue