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

link/kprobe: don't redeclare a new variable sp #365

Merged
merged 1 commit into from
Aug 5, 2021
Merged

Conversation

jellor
Copy link
Contributor

@jellor jellor commented Aug 4, 2021

The statement sp, err := unsafeStringPtr() declares a new variable sp
which shadows the original, which may result in the new variable sp is
collected before PerfEventOpen() is invoked.

The statement sp, err := unsafeStringPtr() declares a new variable sp
which shadows the original, which may result in the new variable sp is
collected before PerfEventOpen() is invoked.
@ti-mo
Copy link
Collaborator

ti-mo commented Aug 5, 2021

Damn, good catch, thank you!

cc @mmat11

@ti-mo ti-mo merged commit e25d7cd into cilium:master Aug 5, 2021
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.

None yet

2 participants