From edd43ef5e957cce7e6e83e9c60300785f645bd11 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 13 Jun 2019 16:48:02 +0200 Subject: [PATCH] weather: fix possible memleak --- src/gui/weather.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/weather.cpp b/src/gui/weather.cpp index 392083974..b4af11f79 100644 --- a/src/gui/weather.cpp +++ b/src/gui/weather.cpp @@ -110,7 +110,10 @@ bool CWeather::GetWeatherDetails() answer.clear(); if (!getUrl(data, answer)) + { + delete reader; return false; + } bool parsedSuccess = reader->parse(answer.c_str(), answer.c_str() + answer.size(), &DataValues, &formattedErrors); delete reader;