mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
super_node: fix nullptr dereference if no config was loaded
This commit is contained in:
parent
25ff130377
commit
1ad92dca28
1 changed files with 4 additions and 2 deletions
|
@ -51,7 +51,8 @@ SuperNode::SuperNode() :
|
|||
hugepages(DEFAULT_NR_HUGEPAGES),
|
||||
stats(0),
|
||||
api(this),
|
||||
web(&api)
|
||||
web(&api),
|
||||
json(nullptr)
|
||||
{
|
||||
list_init(&nodes);
|
||||
list_init(&paths);
|
||||
|
@ -467,7 +468,8 @@ SuperNode::~SuperNode()
|
|||
list_destroy(&paths, (dtor_cb_t) path_destroy, true);
|
||||
list_destroy(&nodes, (dtor_cb_t) node_destroy, true);
|
||||
|
||||
json_decref(json);
|
||||
if (json)
|
||||
json_decref(json);
|
||||
}
|
||||
|
||||
int SuperNode::periodic()
|
||||
|
|
Loading…
Add table
Reference in a new issue