Skip to content

fix: Referrers() may return nil#46

Merged
ryanrolds merged 1 commit intoryanrolds:mainfrom
didebughu:main
Mar 18, 2026
Merged

fix: Referrers() may return nil#46
ryanrolds merged 1 commit intoryanrolds:mainfrom
didebughu:main

Conversation

@didebughu
Copy link
Contributor

When I running golangci-lint with the sqlclosecheck@v0.5.1 a runtime panic occurs due to a nil pointer dereference because ssa.Value.Referrers() may return nil.

This fix only adds defensive checks. I run the tests (make test) and test results diffs show no differences.

@leonklingele
Copy link

Hey @ryanrolds, can we get this merged? 😃 This cbug urrently causes golangci-lint to run using a fork of your repo which would be very nice to avoid.

@ryanrolds ryanrolds merged commit 084f423 into ryanrolds:main Mar 18, 2026
Copy link

@Dustin4444 Dustin4444 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#45

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.

4 participants