Bug 264631 - RDMA/mlx5: Fix memory leak in error flow for subscribe event
Summary: RDMA/mlx5: Fix memory leak in error flow for subscribe event
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-12 11:55 UTC by xiaohuizhang
Modified: 2023-12-28 11:29 UTC (History)
0 users

See Also:


Attachments
a possible patch (966 bytes, patch)
2022-06-12 11:55 UTC, xiaohuizhang
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description xiaohuizhang 2022-06-12 11:55:27 UTC
Created attachment 234637 [details]
a possible patch

In case the second xa_insert() fails, the obj_event is not released.  Fix 
the error unwind flow to free that memory to avoid a memory leak.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2023-12-28 11:29:37 UTC
Comment on attachment 234637 [details]
a possible patch

^Triage: convert this to text/plain and set the Patch flag so that the automation can see it.