Skip to content
Snippets Groups Projects
Commit 655ec6bf authored by Gisle Vanem's avatar Gisle Vanem
Browse files

If CURLDEBUG defined, call curl_memdebug() if $CARES_MEMDEBUG is set.

parent c4ad5333
No related branches found
No related tags found
No related merge requests found
......@@ -93,6 +93,16 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
struct server_state *server;
struct timeval tv;
#ifdef CURLDEBUG
const char *env = getenv("CARES_MEMDEBUG");
if (env)
curl_memdebug(env);
env = getenv("CARES_MEMLIMIT");
if (env)
curl_memlimit(atoi(env));
#endif
channel = malloc(sizeof(struct ares_channeldata));
if (!channel)
return ARES_ENOMEM;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment