mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-29 16:56:22 -04:00
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
This commit is contained in:
parent
12ac381408
commit
faf354c4f3
1 changed files with 3 additions and 0 deletions
|
|
@ -3532,7 +3532,10 @@ bool tagcache_create_changelog(struct tagcache_search *tcs)
|
||||||
if (tcs->masterfd < 0)
|
if (tcs->masterfd < 0)
|
||||||
{
|
{
|
||||||
if ( (tcs->masterfd = open_master_fd(&myhdr, false)) < 0)
|
if ( (tcs->masterfd = open_master_fd(&myhdr, false)) < 0)
|
||||||
|
{
|
||||||
|
close(clfd);
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue