From 4038638c1c7e0cede98ba151116b79fd3ea998ad Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 3 Jul 2020 11:22:36 +0200 Subject: [PATCH] config: fix nullptr deref --- lib/config.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/config.cpp b/lib/config.cpp index 4e4d893c1..0661af3ff 100644 --- a/lib/config.cpp +++ b/lib/config.cpp @@ -48,7 +48,7 @@ Config::Config() : Config::Config(const std::string &u) : Config() { - root = load(u); + load(u); } Config::~Config() @@ -71,7 +71,7 @@ json_t * Config::load(const std::string &u) f = af->file; } - json_t *root = decode(f); + root = decode(f); if (af) afclose(af);