From 6d2990ade59d6ad71cfc2f12a317ad8a15dc1e7d Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sun, 5 Jul 2020 13:23:14 +0100 Subject: [PATCH] avoid issues with uninitialized memory --- lib/node.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/node.cpp b/lib/node.cpp index fb7c63ef8..b926a32c8 100644 --- a/lib/node.cpp +++ b/lib/node.cpp @@ -56,6 +56,8 @@ int node_init(struct node *n, struct node_type *vt) if (!n->_vd) throw RuntimeError("Failed to allocate memory"); + memset(n->_vd, 0, vt->size); + //n->stats = nullptr; n->name = nullptr; n->_name = nullptr;