aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-11-28 23:19:17 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-11-28 23:19:17 +0000
commitcfdcf5c93325b55cd223484b65b73b20a296a6e9 (patch)
tree6d49ca385c20ab158ac0bdaa3ab8dd3c56dd2d07 /lib
parent820de919b68408539c40790d1d92a702db8d2055 (diff)
fill memory with junk on malloc()
Diffstat (limited to 'lib')
-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);