From 6d97cdf25db274a81e9d9edc417b51cf44152733 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 2 Jun 2011 18:41:23 +0300 Subject: Fix some memory leaks and missing initialisations. --- src/gui/whoisonline.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/gui/whoisonline.cpp') diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp index dfb896778..73b6e2e8c 100644 --- a/src/gui/whoisonline.cpp +++ b/src/gui/whoisonline.cpp @@ -368,6 +368,7 @@ int WhoIsOnline::downloadThread(void *ptr) if (!wio->mAllowUpdate) { curl_easy_cleanup(curl); + curl = 0; break; } wio->mDownloadedBytes = 0; @@ -410,11 +411,13 @@ int WhoIsOnline::downloadThread(void *ptr) break; } attempts++; + curl_easy_cleanup(curl); + curl_slist_free_all(pHeaders); + curl = 0; continue; } curl_easy_cleanup(curl); - curl_slist_free_all(pHeaders); // It's stored in memory, we're done -- cgit v1.2.3-70-g09d2