Date: Tue, 01 Jul 2025 15:06:36 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 287945] mlx5e_add_vxlan_rule: possible refcount/memory leak Message-ID: <bug-287945-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
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: bugs@FreeBSD.org Reporter: vangyzen@FreeBSD.org 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.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-287945-227>
