From: Artem Bityutskiy Date: Mon, 18 Apr 2011 14:41:22 +0000 (+0300) Subject: fs-tests: integck: remove symlinks memory leaks X-Git-Tag: v1.4.5~89 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4499ce3b223410d010380efa0bbbcb1c00722006;p=mtd-utils.git fs-tests: integck: remove symlinks memory leaks When we create a symlink we also allocate a symlink_info structure and the target path name. But when we remove a symlink - we do not delete that memory. This patch fixes the issue. Signed-off-by: Artem Bityutskiy --- diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c index 96937ff..94ffeb8 100644 --- a/tests/fs-tests/integrity/integck.c +++ b/tests/fs-tests/integrity/integck.c @@ -1898,6 +1898,8 @@ static int symlink_remove(struct symlink_info *symlink) } remove_dir_entry(symlink->entry); + free(symlink->target_pathname); + free(symlink); free(path); return 0; }