From e9a2d29b33d55ad7b04ffe883acc6bfe11ef55e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Mon, 9 Sep 2013 19:46:00 +0200 Subject: [PATCH] Fixed memory leak while comparing attributes with bad sectors When bad sectors were found when comparing attributes, the attribute descriptors were not closed and freed (fixed by Rakesh Pandit) --- ntfsprogs/ntfscmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntfsprogs/ntfscmp.c b/ntfsprogs/ntfscmp.c index 6cbf77eb..469d1d9a 100644 --- a/ntfsprogs/ntfscmp.c +++ b/ntfsprogs/ntfscmp.c @@ -704,7 +704,7 @@ static void cmp_attribute(ntfs_attr_search_ctx *ctx1, * If difference exists then it's already reported at the * attribute header since the mapping pairs must differ. */ - return; + goto close_attribs; } if (na1->type == AT_INDEX_ALLOCATION)