Skip to content

Commit 23c66d3

Browse files
committed
Close files after usage
1 parent db09b41 commit 23c66d3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/storage/storage.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,11 @@ static void listFiles(const char *const dirname)
7373
{
7474
std::cout << "\t" << file.name() << " (" << (file.isDirectory() ? "d" : "f") << ", " << file.size() << " Bytes)"
7575
<< std::endl;
76+
file.close();
7677
file = root.openNextFile();
7778
}
79+
file.close();
80+
root.close();
7881
}
7982

8083
/**

0 commit comments

Comments
 (0)