diff options
-rw-r--r-- | src/playlist.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/playlist.c b/src/playlist.c index a01fc8063..e310f5fcf 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -1349,6 +1349,11 @@ int savePlaylist(int fd, char *utf8file) while (!(fp = fopen(path_max_tmp, "w")) && errno == EINTR); + if (fp == NULL) { + commandError(fd, ACK_ERROR_SYSTEM, "failed to create file"); + return -1; + } + for (i = 0; i < playlist.length; i++) { char tmp[MPD_PATH_MAX]; |