summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2024-06-02 22:14:27 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2024-06-02 22:14:27 -0400
commitafba86f0f79d314f0414975fa71db6a6a41118cb (patch)
tree12199c8faa24fe06a03764496559c2f2693e32da
parent283f31dd399d839d597fa48ae98dcdccb6188fd7 (diff)
downloadrockbox-afba86f0f7.tar.gz
rockbox-afba86f0f7.zip
[coverity] playlist.c pl_save_update_control() close fd on error
Change-Id: Ib44e86a36540e65a15eed3e9b99106734379250d
-rw-r--r--apps/playlist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 9935643f5d..7040c2a129 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -3931,7 +3931,10 @@ static int pl_save_update_control(struct playlist_info* playlist,
playlist->filename[playlist->dirlen-1] = c;
if (err <= 0)
+ {
+ close(old_fd);
return -4;
+ }
if (playlist->first_index > 0)
{