summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/playlist.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 8334260242..3d3b5f44f8 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -418,10 +418,13 @@ static int recreate_control(struct playlist_info* playlist)
418 playlist->control_fd = open(playlist->control_filename, 418 playlist->control_fd = open(playlist->control_filename,
419 O_CREAT|O_RDWR|O_TRUNC, 0666); 419 O_CREAT|O_RDWR|O_TRUNC, 0666);
420 if (playlist->control_fd < 0) 420 if (playlist->control_fd < 0)
421 {
422 close(temp_fd);
421 return -1; 423 return -1;
424 }
422 425
423 playlist->filename[playlist->dirlen-1] = '\0'; 426 playlist->filename[playlist->dirlen-1] = '\0';
424 427
425 /* cannot call update_control() because of mutex */ 428 /* cannot call update_control() because of mutex */
426 result = fdprintf(playlist->control_fd, "P:%d:%s:%s\n", 429 result = fdprintf(playlist->control_fd, "P:%d:%s:%s\n",
427 PLAYLIST_CONTROL_FILE_VERSION, dir, file); 430 PLAYLIST_CONTROL_FILE_VERSION, dir, file);