mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
hooks: fixed null pointer dereference in stats hook
This commit is contained in:
parent
ce27b79c77
commit
47b600efb7
1 changed files with 2 additions and 1 deletions
|
@ -55,7 +55,8 @@ static int stats_collect_init(struct hook *h)
|
|||
/* Register statistic object to path.
|
||||
*
|
||||
* This allows the path code to update statistics. */
|
||||
h->node->stats = &p->stats;
|
||||
if (h->node)
|
||||
h->node->stats = &p->stats;
|
||||
|
||||
/* Set default values */
|
||||
p->format = STATS_FORMAT_HUMAN;
|
||||
|
|
Loading…
Add table
Reference in a new issue