[PATCH 30/35] fs-tests: integck: free raw write information

Artem Bityutskiy dedekind1 at gmail.com
Wed Apr 20 06:19:03 EDT 2011


From: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>

The test leaks memory like hell because it does not free the raw writes
information. This patch fixes the leaks.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
---
 tests/fs-tests/integrity/integck.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c
index 50b414f..96937ff 100644
--- a/tests/fs-tests/integrity/integck.c
+++ b/tests/fs-tests/integrity/integck.c
@@ -610,6 +610,13 @@ static void free_writes_info(struct file_info *file)
 		free(w);
 		w = next;
 	}
+
+	w = file->raw_writes;
+	while (w) {
+		next = w->next;
+		free(w);
+		w = next;
+	}
 }
 
 /*
-- 
1.7.2.3




More information about the linux-mtd mailing list