fill memory with junk on malloc()

This commit is contained in:
Daniel Stenberg 2001-11-28 23:19:17 +00:00
parent 820de919b6
commit cfdcf5c933
1 changed files with 3 additions and 0 deletions

View File

@ -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);