aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/storedPlaylist.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/storedPlaylist.c b/src/storedPlaylist.c
index b36bb10a7..75605313f 100644
--- a/src/storedPlaylist.c
+++ b/src/storedPlaylist.c
@@ -192,6 +192,8 @@ StoredPlaylist *loadStoredPlaylist(const char *utf8path, int fd)
ERROR("\"%s\" too long", temp);
free(temp);
+ freeStoredPlaylist(sp);
+ sp = NULL;
goto out;
}
free(temp);
@@ -211,6 +213,8 @@ StoredPlaylist *loadStoredPlaylist(const char *utf8path, int fd)
s, utf8path);
}
ERROR("line \"%s\" in playlist \"%s\" is too long\n", s, utf8path);
+ freeStoredPlaylist(sp);
+ sp = NULL;
goto out;
} else if (s[slength] != '\r')
slength++;