Skip to content

bpftool: Fix JSON writer resource leak in version command #9130

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

Closed

Conversation

kernel-patches-daemon-bpf[bot]
Copy link

Pull request for series with
subject: bpftool: Fix JSON writer resource leak in version command
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=972535

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: f66b4aa
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=972535
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=972535 expired. Closing PR.

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: f66b4aa
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=972574
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: f66b4aa
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=972574
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=972574 expired. Closing PR.

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: f66b4aa
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=972966
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: f66b4aa
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=972966
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: a633dab
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=972966
version: 2

When using `bpftool --version -j/-p`, the JSON writer object
created in do_version() was not properly destroyed after use.
This caused a memory leak each time the version command was
executed with JSON output.

Fix: 004b45c (tools: bpftool: provide JSON output for all possible commands)
Signed-off-by: Yuan Chen <[email protected]>
Suggested-by: Quentin Monnet <[email protected]>
Reviewed-by: Quentin Monnet <[email protected]>
@kernel-patches-daemon-bpf
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=972966 irrelevant now. Closing PR.

@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot deleted the series/972535=>bpf-next branch June 17, 2025 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant