https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=287945
Bug ID: 287945
Summary: mlx5e_add_vxlan_rule: possible refcount/memory leak
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: kern
Assignee: [email protected]
Reporter: [email protected]
mlx5e_add_vxlan_rule has this:
el = mlx5e_vxlan_find_db_el(priv, proto, port);
if (el != NULL) {
el->refcount++;
if (el->installed)
return (0);
}
el = mlx5e_vxlan_alloc_db_el(priv, proto, port);
Shouldn't the alloc call be in an "else" clause? When the element exists but
is not installed, the current code _seems_ to leak a refcount and allocate a
duplicate new element.
I found this by code inspection. I am not able to verify this is an actual bug
or test the fix.
If this is an actual bug, it was introduced by commit 0e4cb0d5a48.
--
You are receiving this mail because:
You are the assignee for the bug.