Argument 'size' of function realloc has a fishy (possibly negative) value: -1 at 0x........: realloc (vg_replace_malloc.c:...) by 0x........: main (accounting.c:17) HEAP SUMMARY: in use at exit: 0 bytes in 0 blocks total heap usage: 1 allocs, 1 frees, 1 bytes allocated For a detailed leak analysis, rerun with: --leak-check=full For counts of detected and suppressed errors, rerun with: -v ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)