1
0
Fork 0
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:
Steffen Vogel 2018-04-04 08:29:54 +02:00
parent ce27b79c77
commit 47b600efb7

View file

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