containers / containers/nri-plugins

[bug] Dereference of nil - possible segfault

Open
#360 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
114
Forks
44
Avg merge
1d 8h
Merged PRs (30d)
20

Description

According to the [implementation](https://github.com/containers/nri-plugins/blob/da9e0cdc7072e7b4dc353a2d00eceeff3953e6e5/cmd/plugins/topology-aware/policy/node.go#L254) of the `node.Parent()` method, [this check](https://github.com/containers/nri-plugins/blob/da9e0cdc7072e7b4dc353a2d00eceeff3953e6e5/cmd/plugins/topology-aware/policy/pools.go#L1155) (`!n.IsNil()`) could cause segmentation fault, because `node.Parent()` could return `nil`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.