diff options
author | Thomas Jarosch <tomj@simonv.com> | 2011-08-25 19:42:00 +0000 |
---|---|---|
committer | Thomas Jarosch <tomj@simonv.com> | 2011-08-25 19:42:00 +0000 |
commit | faf354c4f33c49c90355bed2beafe01cf0384c1c (patch) | |
tree | d55732e7ed23e12d2c5b90ff3677f7083b75d496 /apps/tagcache.c | |
parent | 12ac3814081f9a5e97f92247536b7251ea59b62b (diff) | |
download | rockbox-faf354c4f33c49c90355bed2beafe01cf0384c1c.tar.gz 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
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r-- | apps/tagcache.c | 3 |
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) | |||
3532 | if (tcs->masterfd < 0) | 3532 | if (tcs->masterfd < 0) |
3533 | { | 3533 | { |
3534 | if ( (tcs->masterfd = open_master_fd(&myhdr, false)) < 0) | 3534 | if ( (tcs->masterfd = open_master_fd(&myhdr, false)) < 0) |
3535 | { | ||
3536 | close(clfd); | ||
3535 | return false; | 3537 | return false; |
3538 | } | ||
3536 | } | 3539 | } |
3537 | else | 3540 | else |
3538 | { | 3541 | { |