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

node: Fix null-pointer dereference for internal loopback nodes

Signed-off-by: Steffen Vogel <steffen.vogel@opal-rt.com>
This commit is contained in:
Steffen Vogel 2024-03-07 16:13:02 +00:00 committed by pipeacosta
parent 5d4ee25657
commit 353fb545db

View file

@ -74,7 +74,10 @@ Node::~Node() {
rtnl_cls_put(tc_classifier);
#endif // WITH_NETEM
factory->instances.remove(this);
// Internal loopback nodes have no factory
// Only attempt removal for factories of other node-types.
if (factory != nullptr)
factory->instances.remove(this);
}
int Node::prepare() {