Don't call freeStoredPlaylist(sp) inside an if (!sp) block. It causes
segfaults. git-svn-id: https://svn.musicpd.org/mpd/trunk@6264 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
fc094c08d3
commit
fd645486a1
@ -303,7 +303,6 @@ int moveSongInStoredPlaylistByPath(int fd, const char *utf8path, int src, int de
|
||||
StoredPlaylist *sp = loadStoredPlaylist(utf8path, fd);
|
||||
if (!sp) {
|
||||
commandError(fd, ACK_ERROR_UNKNOWN, "could not open playlist");
|
||||
freeStoredPlaylist(sp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -369,7 +368,6 @@ int removeOneSongFromStoredPlaylistByPath(int fd, const char *utf8path, int pos)
|
||||
StoredPlaylist *sp = loadStoredPlaylist(utf8path, fd);
|
||||
if (!sp) {
|
||||
commandError(fd, ACK_ERROR_UNKNOWN, "could not open playlist");
|
||||
freeStoredPlaylist(sp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user