fixed memory leak by calling curl_slist_free_all(headers)
authorAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 9 Mar 2007 16:09:49 +0000 (16:09 -0000)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 9 Mar 2007 16:09:49 +0000 (16:09 -0000)
src/pluto/fetch.c

index d979828..83d4c76 100644 (file)
@@ -337,6 +337,7 @@ fetch_curl(char *url, chunk_t *blob)
        {
            plog("fetching uri (%s) with libcurl failed: %s", url, errorbuffer);
        }
+       curl_slist_free_all(headers);
        curl_easy_cleanup(curl);
        /* not using freeanychunk because of realloc (no leak detective) */
        curl_free(response.ptr);