Commit fd645486 authored by J. Alexander Treuman's avatar J. Alexander Treuman

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
parent fc094c08
...@@ -303,7 +303,6 @@ int moveSongInStoredPlaylistByPath(int fd, const char *utf8path, int src, int de ...@@ -303,7 +303,6 @@ int moveSongInStoredPlaylistByPath(int fd, const char *utf8path, int src, int de
StoredPlaylist *sp = loadStoredPlaylist(utf8path, fd); StoredPlaylist *sp = loadStoredPlaylist(utf8path, fd);
if (!sp) { if (!sp) {
commandError(fd, ACK_ERROR_UNKNOWN, "could not open playlist"); commandError(fd, ACK_ERROR_UNKNOWN, "could not open playlist");
freeStoredPlaylist(sp);
return -1; return -1;
} }
...@@ -369,7 +368,6 @@ int removeOneSongFromStoredPlaylistByPath(int fd, const char *utf8path, int pos) ...@@ -369,7 +368,6 @@ int removeOneSongFromStoredPlaylistByPath(int fd, const char *utf8path, int pos)
StoredPlaylist *sp = loadStoredPlaylist(utf8path, fd); StoredPlaylist *sp = loadStoredPlaylist(utf8path, fd);
if (!sp) { if (!sp) {
commandError(fd, ACK_ERROR_UNKNOWN, "could not open playlist"); commandError(fd, ACK_ERROR_UNKNOWN, "could not open playlist");
freeStoredPlaylist(sp);
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment