UI: Initialize curl before starting the program

It's best to do the global curl initialization separately before any
curl functions are called.  Prevents initialization threading issues.
This commit is contained in:
jp9000 2015-08-16 03:51:22 -07:00
parent 3b8addba3e
commit 23e60561cb

View file

@ -40,6 +40,8 @@
#include <fstream>
#include <curl/curl.h>
#ifdef _WIN32
#include <windows.h>
#else
@ -1244,6 +1246,7 @@ int main(int argc, char *argv[])
fstream logFile;
curl_global_init(CURL_GLOBAL_ALL);
int ret = run_program(logFile, argc, argv);
blog(LOG_INFO, "Number of memory leaks: %ld", bnum_allocs());