]> www.infradead.org Git - mtd-utils.git/commitdiff
fs-tests: integck: free raw write information
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 18 Apr 2011 14:36:12 +0000 (17:36 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 22 Apr 2011 11:29:52 +0000 (14:29 +0300)
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@nokia.com>
tests/fs-tests/integrity/integck.c

index 50b414f89045f8751ee979180a0996babc7d1fc0..96937ffd43531c9b5fabb42d5ee9fd844eec97c2 100644 (file)
@@ -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;
+       }
 }
 
 /*