title: Memory leak from curl library
body: <p>Im having trouble, the below code compiles fine, but when I run it, after it outputs the file, I get a memory leak.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "include\curl\curl.h"
  int main(void)
  {
      CURL *curl;
      CURLcode res;
  
      curl = curl_easy_init();
      if(curl) {
          curl_easy_setopt(curl, CURLOPT_URL, "https://api.del.icio.us/dt");
          curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, true);
          curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2);
          curl_easy_setopt(curl, CURLOPT_CAINFO, "C:\\Users\\bryan\\GeoTrustGlobalCA.crt");
          /* Perform the request, res will get the return code */ 
          res = curl_easy_perform(curl);
          /* Check for errors */ 
          if(res != CURLE_OK)
              fprintf(stderr, "curl_easy_perform() failed: %s\n",
                      curl_easy_strerror(res));
  
          /* always cleanup */ 
          curl_easy_cleanup(curl);
      }
      return 0;
  }
  </code></pre>
  
  <p>I am compiling it w/ gcc 4.7.0 on a windows vista machine using:</p>
  
  <pre><code>g++ -DCURL_STATICLIB testing.cpp -L lib -lcurl -lidn -lwldap32 -lssh2 -lz -lrtm -lcrypto -lgdi32 -lws2_32 -lwinmm -lssl -leay32 -liconv -o testing.exe 
  </code></pre>
  
  <p>Any idea what might be causing this memory leak?</p>