Thread (31 messages) 31 messages, 2 authors, 2022-12-10

Re: [PATCH net-next 04/14] bridge: mcast: Add a centralized error path

From: Nikolay Aleksandrov <razor@blackwall.org>
Date: 2022-12-09 07:32:24
Also in: bridge

On 08/12/2022 17:28, Ido Schimmel wrote:
Subsequent patches will add memory allocations in br_mdb_config_init()
as the MDB configuration structure will include a linked list of source
entries. This memory will need to be freed regardless if br_mdb_add()
succeeded or failed.

As a preparation for this change, add a centralized error path where the
memory will be freed.

Note that br_mdb_del() already has one error path and therefore does not
require any changes.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---
 net/bridge/br_mdb.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help