From 2a55d9f6cd3802b6b69c1020cc8a07ac3fab658c Mon Sep 17 00:00:00 2001 From: Filip Suba Date: Wed, 28 May 2025 15:55:21 +0200 Subject: [PATCH 1/3] Test --- src/c++/vdo/tests/BlockMapRecovery_t1.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/c++/vdo/tests/BlockMapRecovery_t1.c b/src/c++/vdo/tests/BlockMapRecovery_t1.c index 706ab5d92..0870c6430 100644 --- a/src/c++/vdo/tests/BlockMapRecovery_t1.c +++ b/src/c++/vdo/tests/BlockMapRecovery_t1.c @@ -30,7 +30,6 @@ enum { }; static size_t entryCount = 0; -static struct repair_completion *repair_completion = NULL; /** * Initialize the index, vdo, and test data. @@ -75,7 +74,7 @@ static bool preventReferenceCountRebuild(struct vdo_completion *completion) struct vdo_completion *parent = completion->parent; int result = completion->result; - repair_completion = (struct repair_completion *) completion; + free_repair_completion((struct repair_completion *) completion); vdo_fail_completion(parent, result); return false; } @@ -156,7 +155,6 @@ static void testRecovery(size_t desiredEntryCount) // Do a block map recovery. setCompletionEnqueueHook(hijackJournalLoad); performSuccessfulAction(vdo_repair); - free_repair_completion(repair_completion); // Verify that all block map mappings are either the original value or the // new mapping expected from recovery. From 20bf3d1ff1b3e7d7008b2c008d15209854793106 Mon Sep 17 00:00:00 2001 From: Filip Suba Date: Wed, 28 May 2025 16:13:58 +0200 Subject: [PATCH 2/3] test2 --- src/c++/vdo/user/vdoStats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c++/vdo/user/vdoStats.c b/src/c++/vdo/user/vdoStats.c index a536e3d15..56e961b82 100644 --- a/src/c++/vdo/user/vdoStats.c +++ b/src/c++/vdo/user/vdoStats.c @@ -180,8 +180,8 @@ static void displayDFStyle(const char *path, struct vdo_statistics *stats) // Extract the device name. Use strdup for non const string. char *devicePath = strdup(path); - strcpy(dfName, basename(devicePath)); free(devicePath); + strcpy(dfName, basename(devicePath)); // Display the device statistics if (!headerPrinted) { From f634dbdcc5f6fb6bcda4dd464b10e44a6d1aa8e1 Mon Sep 17 00:00:00 2001 From: Filip Suba Date: Thu, 29 May 2025 07:40:25 +0200 Subject: [PATCH 3/3] Test 3 --- src/c++/vdo/base/logical-zone.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/c++/vdo/base/logical-zone.c b/src/c++/vdo/base/logical-zone.c index 026f031ff..134778b09 100644 --- a/src/c++/vdo/base/logical-zone.c +++ b/src/c++/vdo/base/logical-zone.c @@ -133,11 +133,11 @@ void vdo_free_logical_zones(struct logical_zones *zones) return; vdo_free(vdo_forget(zones->manager)); + + vdo_free(zones); for (index = 0; index < zones->zone_count; index++) vdo_int_map_free(vdo_forget(zones->zones[index].lbn_operations)); - - vdo_free(zones); } static inline void assert_on_zone_thread(struct logical_zone *zone, const char *what)