From a4128d4288afb7b219812a87b97a097b1c749864 Mon Sep 17 00:00:00 2001 From: Dan Sheppard Date: Wed, 23 Apr 2025 00:15:31 +0100 Subject: [PATCH] Fix leak during tests. --- Makefile | 2 +- src/superblock.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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() { -- 2.30.2