From 537208cf46cdd92dfc31853dacaefe05413c7c5e Mon Sep 17 00:00:00 2001
From: Pawel Andruszkiewicz
Date: Wed, 3 Jun 2015 15:42:30 +0200
Subject: [PATCH] [Archive] Close directory in case of error.
Prevent CID: 403458
[Verification] TCT pass rate: 100%
Change-Id: Id81c0cc98ce662597e014c57cec8a8e403382cb9
Signed-off-by: Pawel Andruszkiewicz
---
src/archive/filesystem_node.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/archive/filesystem_node.cc b/src/archive/filesystem_node.cc
index f76950c1..208955ac 100755
--- a/src/archive/filesystem_node.cc
+++ b/src/archive/filesystem_node.cc
@@ -614,6 +614,7 @@ PlatformResult Node::removeAsDirectory(const PathPtr& path, bool recursive)
}
if (result.error_code() != ErrorCode::NO_ERROR) {
LoggerE("Fail: getFullPath() (%d)",result.error_code());
+ closedir(dir);
return result;
}
}
--
2.34.1