summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-09-18 11:50:08 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-09-18 11:50:08 -0700
commita2e524ecf396722020e85b39d7b5e83d7c95ec24 (patch)
tree7fb8c328d71d21d6a39bb8be4d4c51f40d9138ec
parentMerge branch 'jk/drop-release-pack-memory' (diff)
parenthttp: use xmalloc with cURL (diff)
downloadtgif-a2e524ecf396722020e85b39d7b5e83d7c95ec24.tar.xz
Merge branch 'cb/curl-use-xmalloc'
Tell cURL library to use the same malloc() implementation, with the xmalloc() wrapper, as the rest of the system, for consistency. * cb/curl-use-xmalloc: http: use xmalloc with cURL
-rw-r--r--http.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/http.h b/http.h
index b429f1cf04..5e0ad724f9 100644
--- a/http.h
+++ b/http.h
@@ -25,8 +25,12 @@
#if LIBCURL_VERSION_NUM < 0x070704
#define curl_global_cleanup() do { /* nothing */ } while (0)
#endif
+
#if LIBCURL_VERSION_NUM < 0x070800
#define curl_global_init(a) do { /* nothing */ } while (0)
+#elif LIBCURL_VERSION_NUM >= 0x070c00
+#define curl_global_init(a) curl_global_init_mem(a, xmalloc, free, \
+ xrealloc, xstrdup, xcalloc)
#endif
#if (LIBCURL_VERSION_NUM < 0x070c04) || (LIBCURL_VERSION_NUM == 0x071000)