Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix networkanalyzer nil pointer if the protocol is NOSUPPORT with nil attributes #416

Merged
merged 1 commit into from
Dec 22, 2022

Conversation

hocktea214
Copy link
Collaborator

Signed-off-by: huxiangyuan [email protected]

Description

Fix nil pointer panic introduced by Pull-293

panic({0xa737a0, 0x106c1c0})
     /usr/local/go/src/runtime/panic.go:884 +0x212
github.com/Kindling-project/kindling/collector/pkg/model.(*AttributeMap).HasAttribute(...)
     /root/kindling/collector/pkg/model/attribute_map.go:67
github.com/Kindling-project/kindling/collector/pkg/component/analyzer/network.(*NetworkAnalyzer).getRecords(0xc00019c6c0, 0xc000434230, {0xc0003d1686, 0x9}, 0x0)
     /root/kindling/collector/pkg/component/analyzer/network/network_analyzer.go:548 +0x60
github.com/Kindling-project/kindling/collector/pkg/component/analyzer/network.(*NetworkAnalyzer).parseProtocols(0xc00019c6c0, 0xc000434230)
     /root/kindling/collector/pkg/component/analyzer/network/network_analyzer.go:385 +0xeb

Related Issue

Motivation and Context

How Has This Been Tested?

=== RUN TestNoSupportProtocol/normal
--- PASS: TestNoSupportProtocol (0.00s)
--- PASS: TestNoSupportProtocol/normal (0.00s)

@dxsup dxsup changed the title FIX nil poniter panic by static protocol with empty attributes Fix networkanalyzer nil pointer if the protocol is NOSUPPORT with nil attributes Dec 22, 2022
@dxsup dxsup merged commit 400d7ce into KindlingProject:main Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants