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

pull/1/head
Gisle Vanem 19 years ago
parent fb7987171c
commit a5c01eed75
  1. 10
      ares_init.c

@ -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;

Loading…
Cancel
Save