summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Jarosch <tomj@simonv.com>2011-08-25 19:42:00 +0000
committerThomas Jarosch <tomj@simonv.com>2011-08-25 19:42:00 +0000
commitfaf354c4f33c49c90355bed2beafe01cf0384c1c (patch)
treed55732e7ed23e12d2c5b90ff3677f7083b75d496
parent12ac3814081f9a5e97f92247536b7251ea59b62b (diff)
downloadrockbox-faf354c4f33c49c90355bed2beafe01cf0384c1c.tar.gz
rockbox-faf354c4f33c49c90355bed2beafe01cf0384c1c.tar.bz2
rockbox-faf354c4f33c49c90355bed2beafe01cf0384c1c.zip
Fix file descriptor leak on error
Credit goes to "cppcheck" again. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30350 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/tagcache.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 0f78639b4a..52e059a04a 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -3532,7 +3532,10 @@ bool tagcache_create_changelog(struct tagcache_search *tcs)
if (tcs->masterfd < 0)
{
if ( (tcs->masterfd = open_master_fd(&myhdr, false)) < 0)
+ {
+ close(clfd);
return false;
+ }
}
else
{