From: Dan Sheppard Date: Tue, 22 Apr 2025 23:15:31 +0000 (+0100) Subject: Fix leak during tests. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~dans/git?a=commitdiff_plain;h=a4128d4288afb7b219812a87b97a097b1c749864;p=coquet.git Fix leak during tests. --- diff --git a/Makefile b/Makefile index 71a574d..a5b373f 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ LIBS = CC = gcc CFLAGS = -Wall --std=c99 MAINCFLAGS = -O3 -TESTCFLAGS = -O3 # or -g +TESTCFLAGS = -g .PHONY: default all clean test diff --git a/src/superblock.c b/src/superblock.c index 45dd1d9..bb6bd8a 100644 --- a/src/superblock.c +++ b/src/superblock.c @@ -423,6 +423,10 @@ void test_superblock_corruption() { pos = i<100 ?i : 100+i*9; make_superblock(&cq,1,2048+pos,12); } + + testvfs_fakerandom(cq.vfs_data,-1); + r = coquet_finish(&cq); + test_bail(&cq,r); } void test_superblock() {