aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 3cfd4a9b5..caf02e7cc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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;