Skip to content

Conversation

@detsch
Copy link
Member

@detsch detsch commented Nov 1, 2025

httpDoOnce may return nil for the response in case of errors. This was leading to a nil pointer dereference when trying to log the response. This patch adds a check to avoid accessing the response status code in that case.
A second check is also added on the break condition, when err != nil. This should not be needed with the current httpDoOnce implementation, but is added for safety in case of future changes.

httpDoOnce may return nil for the response in case of errors. This was
leading to a nil pointer dereference when trying to log the response.
This patch adds a check to avoid accessing the response status code in
that case.
A second check is also added on the break condition, when err != nil.
This should not be needed with the current httpDoOnce implementation,
but is added for safety in case of future changes.

Signed-off-by: Andre Detsch <andre.detsch@foundries.io>
@detsch detsch requested a review from doanac November 1, 2025 17:23
Copy link
Member

@doanac doanac left a comment

Choose a reason for hiding this comment

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

I hit this same bug on Friday and was queuing up something similar. thanks.

@detsch detsch merged commit 0c6d0ac into main Nov 1, 2025
2 checks passed
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.

3 participants