[Archive] Close directory in case of error.
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>
Wed, 3 Jun 2015 13:42:30 +0000 (15:42 +0200)
committerPawel Andruszkiewicz <p.andruszkie@samsung.com>
Wed, 3 Jun 2015 13:42:30 +0000 (15:42 +0200)
Prevent CID: 403458

[Verification] TCT pass rate: 100%

Change-Id: Id81c0cc98ce662597e014c57cec8a8e403382cb9
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
src/archive/filesystem_node.cc

index f76950c1370239b5f23f99ceb948ee8b81c4782d..208955ac1575dc06c522d8bda95aa41a2894941b 100755 (executable)
@@ -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;
                 }
             }