Add .gitignore file.
[fedora-mingw.git] / curl / curl-7.19.4-tool-leak.patch
1 diff -ruNp curl-7.19.4.orig/include/curl/curl.h curl-7.19.4/include/curl/curl.h
2 --- curl-7.19.4.orig/include/curl/curl.h        2009-03-03 00:05:31.000000000 +0100
3 +++ curl-7.19.4/include/curl/curl.h     2009-03-10 14:49:47.017943954 +0100
4 @@ -1510,7 +1510,7 @@ CURL_EXTERN void curl_free(void *p);
5   * DESCRIPTION
6   *
7   * curl_global_init() should be invoked exactly once for each application that
8 - * uses libcurl
9 + * uses libcurl and before any call of other libcurl function
10   */
11  CURL_EXTERN CURLcode curl_global_init(long flags);
12  
13 diff -ruNp curl-7.19.4.orig/src/main.c curl-7.19.4/src/main.c
14 --- curl-7.19.4.orig/src/main.c 2009-02-17 10:10:21.000000000 +0100
15 +++ curl-7.19.4/src/main.c      2009-03-10 14:49:50.297971916 +0100
16 @@ -3969,6 +3969,12 @@ operate(struct Configurable *config, int
17  
18    memset(&heads, 0, sizeof(struct OutStruct));
19  
20 +  /* initialize curl library - do not call any libcurl functions before */
21 +  if (main_init() != CURLE_OK) {
22 +    helpf(config->errors, "error initializing curl library\n");
23 +    return CURLE_FAILED_INIT;
24 +  }
25 +
26  #ifdef CURLDEBUG
27    /* this sends all memory debug messages to a logfile named memdump */
28    env = curlx_getenv("CURL_MEMDEBUG");
29 @@ -4015,10 +4021,6 @@ operate(struct Configurable *config, int
30  #endif
31  
32    /* inits */
33 -  if (main_init() != CURLE_OK) {
34 -    helpf(config->errors, "error initializing curl library\n");
35 -    return CURLE_FAILED_INIT;
36 -  }
37    config->postfieldsize = -1;
38    config->showerror=TRUE;
39    config->use_httpget=FALSE;