Skip to content

Fix: always cleanup db copy buffer in create_report#2979

Open
mattmundell wants to merge 5 commits into
mainfrom
asan-db-copy-buffer
Open

Fix: always cleanup db copy buffer in create_report#2979
mattmundell wants to merge 5 commits into
mainfrom
asan-db-copy-buffer

Conversation

@mattmundell

Copy link
Copy Markdown
Contributor

What

Always call db_copy_buffer_cleanup in create_report.

Why

The copy buffer was sometimes leaking.

Testing

For 6dc4f87, I ran GMP commands on main and saw Asan leak logs.
Then I ran the same commands with the PR and the logs were gone.

The others are all internal/OOM errors, so are hard to test in a reproducible way.

The error case of the owner query was leaking copy_buffer.
Also move these cases up, else they have to free all the quoted_* vars.
Also move this cases up, else it has to free all the quoted_* vars.
The copy buffer still needs to be freed when count is 0.
Easier to read if they're the same.
@mattmundell mattmundell requested review from a team as code owners June 21, 2026 09:05
@greenbonebot greenbonebot enabled auto-merge (rebase) June 21, 2026 09:05
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.

1 participant