1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

added calls to curl_global_*, they aren't really needed for this application

but it shows good manner to always cleanup
This commit is contained in:
Daniel Stenberg 2001-05-28 15:06:46 +00:00
parent 1e5e0f9a26
commit b082832220

View File

@ -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;
}