Commit cfdcf5c9 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

fill memory with junk on malloc()

parent 820de919
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);