summaryrefslogtreecommitdiff
path: root/apps/tagcache.c
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2007-11-23 18:32:00 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2007-11-23 18:32:00 +0000
commitded6554cb0393bf95ab119086b4c8d704e8fd23d (patch)
tree8c5a5131214a683738a9c2f53f493b31e084b345 /apps/tagcache.c
parentcb65426b2c76ac64852bda9ece6d72be404bc636 (diff)
downloadrockbox-ded6554cb0393bf95ab119086b4c8d704e8fd23d.zip
rockbox-ded6554cb0393bf95ab119086b4c8d704e8fd23d.tar.gz
rockbox-ded6554cb0393bf95ab119086b4c8d704e8fd23d.tar.bz2
rockbox-ded6554cb0393bf95ab119086b4c8d704e8fd23d.tar.xz
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
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r--apps/tagcache.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 2882aa8..bf2df7c 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__