http: use xmalloc with cURL
f0ed8226c9 (Add custom memory allocator to MinGW and MacOS builds, 2009-05-31) never told cURL about it. Correct that by using the cURL initializer available since version 7.12 to point to xmalloc and friends for consistency which then will pass the allocation requests along when USE_NED_ALLOCATOR=YesPlease is used (most likely in Windows) Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Carlo Marcelo Arenas Belón committed
Aug 15, 2019 at 12:13 UTC
93b980e58f5624ee4e3b2dc0d0babaa97ef66d19
1 file changed
+4
http.h
+4
@@ -25,8 +25,12 @@
25
#if LIBCURL_VERSION_NUM < 0x070704
26
#define curl_global_cleanup() do { /* nothing */ } while (0)
27
#endif
28
+
29
#if LIBCURL_VERSION_NUM < 0x070800
30
#define curl_global_init(a) do { /* nothing */ } while (0)
31
+#elif LIBCURL_VERSION_NUM >= 0x070c00
32
+#define curl_global_init(a) curl_global_init_mem(a, xmalloc, free, \
33
+ xrealloc, xstrdup, xcalloc)
34
#endif
35
36
#if (LIBCURL_VERSION_NUM < 0x070c04) || (LIBCURL_VERSION_NUM == 0x071000)