1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

config: fix nullptr deref

This commit is contained in:
Steffen Vogel 2020-07-03 11:22:36 +02:00
parent 87dbc48674
commit 4038638c1c

View file

@ -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);