aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/memdebug.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/memdebug.c b/lib/memdebug.c
index 82ebf00d9..0d0c43eb6 100644
--- a/lib/memdebug.c
+++ b/lib/memdebug.c
@@ -70,6 +70,9 @@ void curl_memdebug(const char *logname)
void *curl_domalloc(size_t size, int line, const char *source)
{
void *mem=(malloc)(size);
+ if(mem)
+ /* fill memory with junk */
+ memset(mem, 0xA5, size);
if(logfile)
fprintf(logfile, "MEM %s:%d malloc(%d) = %p\n",
source, line, size, mem);