cURL / Mailing Lists / curl-library / Single Mail


Crash/memory leak in http_proxy.c when custom memory manager callbacks are used

From: Ajit Dhumale <>
Date: Tue, 13 Nov 2012 05:54:25 +0530 (IST)


While investigating a memory leak, I observed that ‘http_proxy.c’ calls ‘free’ but does not include ‘curl_memory.h’. When a custom memory manager is used (using curl_global_init_mem), memory allocation is done using the custom memory manager callbacks but ‘free’ in http_proxy.c still uses the default ‘free’ function. This could lead to either a crash or memory leak. I am attaching a patch which fixed the memory leak I observed.

Best regards,
Ajit Dhumale

List admin:

Received on 2012-11-15