aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-05-28 15:06:46 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-05-28 15:06:46 +0000
commitb082832220759465321673a5b3be8294bbc1976c (patch)
tree61f295d79c53d16412eac6ec4f6beda2ac7e218b
parent1e5e0f9a2647e2c8ccae30aee31c9a0ba346a62f (diff)
added calls to curl_global_*, they aren't really needed for this application
but it shows good manner to always cleanup
-rw-r--r--src/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 046fa1d19..d2cc1dcb0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -179,6 +179,7 @@ static CURLcode win32_init(void) { return CURLE_OK; }
*/
CURLcode main_init(void)
{
+ curl_global_init();
return win32_init();
}
@@ -189,6 +190,7 @@ CURLcode main_init(void)
void main_free(void)
{
win32_cleanup();
+ curl_global_cleanup();
}
int SetHTTPrequest(HttpReq req, HttpReq *store)
@@ -1458,7 +1460,7 @@ operate(struct Configurable *config, int argc, char *argv[])
curl_memdebug("memdump");
#endif
- main_init(); /* inits winsock crap for windows */
+ main_init(); /* inits */
config->showerror=TRUE;
config->conf=CONF_DEFAULT;
@@ -1901,7 +1903,7 @@ operate(struct Configurable *config, int argc, char *argv[])
/* cleanup the curl handle! */
curl_easy_cleanup(curl);
- main_free(); /* cleanup the winsock stuff for windows */
+ main_free(); /* cleanup */
return res;
}