From 29cc9e8a0a98540ee00dbde14cf9b83463c82526 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Sun, 10 May 2020 06:18:33 -0500 Subject: [PATCH] Fix another place where json::parse() result was leaked Signed-off-by: Shaun Ruffell --- src/IntervalFactory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IntervalFactory.cpp b/src/IntervalFactory.cpp index 1fce8fb8..0a2d2c36 100644 --- a/src/IntervalFactory.cpp +++ b/src/IntervalFactory.cpp @@ -127,7 +127,7 @@ Interval IntervalFactory::fromJson (const std::string& jsonString) if (!jsonString.empty ()) { - auto* json = (json::object*) json::parse (jsonString); + std::unique_ptr json (dynamic_cast (json::parse (jsonString))); json::array* tags = (json::array*) json->_data["tags"];