• Rusty Russell's avatar
    crcsync: fix memory leak in tests. · bd9ff087
    Rusty Russell authored
    /home/rusty/devel/cvs/ccan/ccan/crcsync/test/run-crash.c:==6923== 112 bytes in 1 blocks are definitely lost in loss record 2 of 3
    ==6923==    at 0x402BA7A: malloc (vg_replace_malloc.c:261)
    ==6923==    by 0x80492EE: crcblocks (run-crash.c:20)
    ==6923==    by 0x8049448: main (run-crash.c:62)
    ==6923== 2,217 (2,212 direct, 5 indirect) bytes in 1 blocks are definitely lost in loss record 3 of 3
    ==6923==    at 0x402BA7A: malloc (vg_replace_malloc.c:261)
    ==6923==    by 0x8048AA0: crc_context_new (crcsync.c:85)
    ==6923==    by 0x8049476: main (run-crash.c:64)
    
    /home/rusty/devel/cvs/ccan/ccan/crcsync/test/run.c:==11793== 512 bytes in 1 blocks are definitely lost in loss record 1 of 2
    ==11793==    at 0x402A52B: calloc (vg_replace_malloc.c:462)
    ==11793==    by 0x8049A3F: main (run.c:128)
    ==11793== 512 bytes in 1 blocks are definitely lost in loss record 2 of 2
    ==11793==    at 0x402A52B: calloc (vg_replace_malloc.c:462)
    ==11793==    by 0x8049A57: main (run.c:129)
    Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
    bd9ff087
run.c 7.44 KB