mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 16:18:48 -05:00
memory debugging is now only enabled if the CURL_MEMDEBUG environment
variable is set when curl is invoked
This commit is contained in:
parent
0cacbc892c
commit
907dabed5d
11
src/main.c
11
src/main.c
@ -1890,13 +1890,18 @@ operate(struct Configurable *config, int argc, char *argv[])
|
|||||||
int res = 0;
|
int res = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
errorbuffer[0]=0; /* prevent junk from being output */
|
|
||||||
|
|
||||||
#ifdef MALLOCDEBUG
|
#ifdef MALLOCDEBUG
|
||||||
/* this sends all memory debug messages to a logfile named memdump */
|
/* 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
|
#endif
|
||||||
|
|
||||||
|
errorbuffer[0]=0; /* prevent junk from being output */
|
||||||
|
|
||||||
main_init(); /* inits */
|
main_init(); /* inits */
|
||||||
|
|
||||||
config->showerror=TRUE;
|
config->showerror=TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user