diff --git a/src/gui/audioplayer.cpp b/src/gui/audioplayer.cpp index 4807aeb23..167da68e5 100644 --- a/src/gui/audioplayer.cpp +++ b/src/gui/audioplayer.cpp @@ -1055,9 +1055,6 @@ void CAudioPlayerGui::processPlaylistUrl(const char *url, const char *name, cons /* get it! */ curl_easy_perform(curl_handle); - /* cleanup curl stuff */ - curl_easy_cleanup(curl_handle); - /* * Now, our chunk.memory points to a memory block that is chunk.size * bytes big and contains the remote file. @@ -1098,6 +1095,9 @@ void CAudioPlayerGui::processPlaylistUrl(const char *url, const char *name, cons } } + /* cleanup curl stuff */ + curl_easy_cleanup(curl_handle); + if (chunk.memory) free(chunk.memory);