-
Notifications
You must be signed in to change notification settings - Fork 4.9k
golang: should avoid using an uninitialized request #39241
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -351,6 +352,10 @@ func envoyGoFilterOnHttpLog(r *C.httpRequest, logType uint64, | |||
//export envoyGoFilterOnHttpStreamComplete | |||
func envoyGoFilterOnHttpStreamComplete(r *C.httpRequest) { | |||
req := getRequest(r) | |||
if req == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should similar handling also be done in envoyGoFilterOnHttpDestroy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I submit a new commit to follow the DRY rule.
Signed-off-by: 罗泽轩 <spacewanderlzx@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for the report from @johnlanni
Commit Message:
Additional Description:
Risk Level: Low
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]