From 9a0aa76a48d5310fbade9eb33ea1973eefa7c24b Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 14 Jun 2019 22:40:28 +0200 Subject: [PATCH] weather: fix possible memleak Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/eed43897417173e8c7146dcd8fa8d767b13e0969 Author: Jacek Jendrzej Date: 2019-06-14 (Fri, 14 Jun 2019) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/weather.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/weather.cpp b/src/gui/weather.cpp index 95bbca51f..0cba28a36 100644 --- a/src/gui/weather.cpp +++ b/src/gui/weather.cpp @@ -111,7 +111,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;