diff options
author | Daniel Stenberg <daniel@haxx.se> | 2009-03-11 23:00:31 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2009-03-11 23:00:31 +0000 |
commit | 0a5cf3a9283883a209d6f447d84f4320ce2f4b7b (patch) | |
tree | 62ba1c628706200dadbbe2b6c9ebc045a4ef18f8 | |
parent | 6173e38fdcf5a9db84be511dfcf0037b8339c0bb (diff) |
Oops, make the memory magic debug stuff done before global init too just to
catch them all. The memory debug stuff is not in the public API anyway.
-rw-r--r-- | src/main.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c index 26fa3c85b..bb347b2f4 100644 --- a/src/main.c +++ b/src/main.c @@ -3969,12 +3969,6 @@ operate(struct Configurable *config, int argc, argv_item_t argv[]) memset(&heads, 0, sizeof(struct OutStruct)); - /* initialize curl library - do not call any libcurl functions before */ - if (main_init() != CURLE_OK) { - helpf(config->errors, "error initializing curl library\n"); - return CURLE_FAILED_INIT; - } - #ifdef CURLDEBUG /* this sends all memory debug messages to a logfile named memdump */ env = curlx_getenv("CURL_MEMDEBUG"); @@ -3995,6 +3989,15 @@ operate(struct Configurable *config, int argc, argv_item_t argv[]) } #endif + /* Initialize curl library - do not call any libcurl functions before. + Note that the CURLDEBUG magic above is an exception, but then that's not + part of the official public API. + */ + if (main_init() != CURLE_OK) { + helpf(config->errors, "error initializing curl library\n"); + return CURLE_FAILED_INIT; + } + /* * Get a curl handle to use for all forthcoming curl transfers. Cleanup * when all transfers are done. |