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

Some fixes found while playing with clang scan-build #1574

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nmorey
Copy link
Contributor

@nmorey nmorey commented Mar 4, 2025

No description provided.

@jgunthorpe
Copy link
Member

The fixes lines should all be in the trailer block, no blank line before the signed-off-vy

nmorey added 4 commits March 4, 2025 14:20
In case of malloc error, not all allocated memory is freed.
Cleanup all error handling to make sure every thing is properly freed.

Fixes: fb11e5a ("libibmad: Add new API to support SMI/GSI seperation")
Signed-off-by: Nicolas Morey <[email protected]>
clang static analyzer is getting confused by ibexit as
it is not marked as noreturn.
Add the noreturn attribute to silence a few false bugs.

Signed-off-by: Nicolas Morey <[email protected]>
dr_arg_obj are wrongly allocated as dr_arg_pool.
Fix by using the correct type for allocation.

Fixes: 97f573f ("mlx5: DR, Add modify_header_arg pool mechanism")
Signed-off-by: Nicolas Morey <[email protected]>
If realloc fails, info pointers is being set to NULL although its original
memory has not been freed.
Use a temporary pointer to be able to free the original memory in case
realloc fails.

Fixes: bfc56ce ("mlx5: Setup mlx5 vfio context")
Signed-off-by: Nicolas Morey <[email protected]>
@nmorey nmorey force-pushed the dev/master/fixes branch from 65011d8 to f6346c2 Compare March 4, 2025 13:20
@nmorey
Copy link
Contributor Author

nmorey commented Mar 4, 2025

Should be fixed now

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.

2 participants