From: Artem Bityutskiy Date: Mon, 18 Apr 2011 14:36:12 +0000 (+0300) Subject: fs-tests: integck: free raw write information X-Git-Tag: v1.4.5~90 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e5047f54b8f160c829da31f91a0bf459219b8c0e;p=mtd-utils.git fs-tests: integck: free raw write information 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 --- 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; + } } /*