pastebin

Paste #81469: Untitled ASCII paste by 113.108.133.61

~ valgrind --tool=memcheck --leak-check=full ./mask
==3593== Memcheck, a memory error detector
==3593== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==3593== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==3593== Command: ./mask
==3593== 
==3593== 
==3593== HEAP SUMMARY:
==3593==     in use at exit: 1,000 bytes in 1 blocks
==3593==   total heap usage: 2 allocs, 1 frees, 1,010 bytes allocated
==3593== 
==3593== 1,000 bytes in 1 blocks are definitely lost in loss record 1 of 1
==3593==    at 0x402B018: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==3593==    by 0x8048430: main (mask.c:17)
==3593== 
==3593== LEAK SUMMARY:
==3593==    definitely lost: 1,000 bytes in 1 blocks
==3593==    indirectly lost: 0 bytes in 0 blocks
==3593==      possibly lost: 0 bytes in 0 blocks
==3593==    still reachable: 0 bytes in 0 blocks
==3593==         suppressed: 0 bytes in 0 blocks
==3593== 
==3593== For counts of detected and suppressed errors, rerun with: -v
==3593== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
~ tail -n 30 mask.c | grep "."
int main(int argc, char *argv[])
{
  int *p;
  malloc(1000);
  p = malloc(10);
  free(p);
  
  return 0;
}

Private
Wrap long lines

4 + 2 =