From ded6554cb0393bf95ab119086b4c8d704e8fd23d Mon Sep 17 00:00:00 2001 From: Miika Pekkarinen Date: Fri, 23 Nov 2007 18:32:00 +0000 Subject: Free resources properly. Fixes all kind of strange issues (shutdown problems with dircache and dirfds running out) with the newly added database.ignore -feature. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15780 a1c6a512-1295-4272-9138-f99709370657 --- apps/tagcache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/tagcache.c b/apps/tagcache.c index 2882aa8b00..bf2df7cc0b 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c @@ -3807,8 +3807,11 @@ static bool check_dir(const char *dirname) /* check for a database.ignore file */ snprintf(newpath, MAX_PATH, "%s/database.ignore", dirname); - if(file_exists(newpath)) + if (file_exists(newpath)) + { + closedir(dir); return false; + } /* Recursively scan the dir. */ #ifdef __PCTOOL__ -- cgit v1.2.3