Re: Using libcurl in another library, when/if to call curl_global_init?

2022-04-22 Thread Mark Wielaard via curl-library
Hi, On Thu, Mar 31, 2022 at 03:19:51PM +0200, Mark Wielaard via curl-library wrote: > On Thu, Mar 31, 2022 at 04:00:16PM +0300, Catalin Raceanu via curl-library > wrote: > > On 31-Mar-22 15:04, Mark Wielaard wrote: > > > whether there is a thread-safe way to call > > > curl_global_init at a later

Re: Feature request about curlinfo option returning resolver status/error code

2022-04-22 Thread Daniel F via curl-library
Hi, DNS error codes mentioned earlier are returned by DNS itself, so they do not cover all possible problems. You also need to define values for various network-related problems (e.g. timeouts, ICMP errors, malformed packets) and software/configuration ones (e.g. out of memory, permission deni

RE: Feature request about curlinfo option returning resolver status/error code

2022-04-22 Thread Dmitry Karpov via curl-library
This would make a perfect sense if all resolvers provided most of their codes very close to general DNS RCODEs with a very small resolver-specific set "Reserved for Private Use". But this is not the case, as far as I can tell, and the resolvers never intended to return status codes close to DNS

Re: Libcurl curl_slist_append() leads to memory leak.

2022-04-22 Thread Timothe Litt via curl-library
Besides not calling curl_slist_free_all() per list_append.html The list should be freed again (after usage) withcurl_slist_free_all . (Someone beat me to pointing that out...) If the code shown is complete, you're not using the headers -

Re: Libcurl curl_slist_append() leads to memory leak.

2022-04-22 Thread Kerry Loux via curl-library
It looks like you're missing a call to curl_slist_free_all(). See: https://curl.se/libcurl/c/curl_slist_append.html -Kerry On Fri, Apr 22, 2022 at 9:25 AM Iku_ex Diaz via curl-library wrote: > > System > x86 with Linux Ubuntu 22.04 > > Problem > I'm running a program that uses libcurl to perfo

Libcurl curl_slist_append() leads to memory leak.

2022-04-22 Thread Iku_ex Diaz via curl-library
*System* x86 with Linux Ubuntu 22.04 *Problem* I'm running a program that uses libcurl to perform 3 requests, one GET, and two PUT. Using *Valgrind *outputs several memory leaks originated at the *curl_slist_append() *calls for the two PUT requests. *TRACE:* ==15078== HEAP SUMMARY: ==15078==