memory debugging is now only enabled if the CURL_MEMDEBUG environment

variable is set when curl is invoked
This commit is contained in:
Daniel Stenberg 2002-02-28 12:35:09 +00:00
parent 0cacbc892c
commit 907dabed5d
1 changed files with 8 additions and 3 deletions

View File

@ -1890,13 +1890,18 @@ operate(struct Configurable *config, int argc, char *argv[])
int res = 0;
int i;
errorbuffer[0]=0; /* prevent junk from being output */
#ifdef MALLOCDEBUG
/* this sends all memory debug messages to a logfile named memdump */
curl_memdebug("memdump");
char *env;
env = curl_getenv("CURL_MEMDEBUG");
if(env) {
free(env);
curl_memdebug("memdump");
}
#endif
errorbuffer[0]=0; /* prevent junk from being output */
main_init(); /* inits */
config->showerror=TRUE;