From f241d11c93a34550f8dbf7ab07d22d8b8f50cf8c Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 7 Apr 2013 17:57:58 +0200 Subject: [PATCH] audioplayer: don't free curl_handle too early Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/a5c61603847de5fe9859bf9117e6b1110f2e5fe1 Author: Stefan Seyfried Date: 2013-04-07 (Sun, 07 Apr 2013) --- src/gui/audioplayer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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);