Re: [PATCH net] net: hsr: fix memory leak in hsr_dev_finalize()

2019-03-06 Thread David Miller
From: Mao Wenan Date: Wed, 6 Mar 2019 22:45:01 +0800 > If hsr_add_port(hsr, hsr_dev, HSR_PT_MASTER) failed to > add port, it directly returns res and forgets to free the node > that allocated in hsr_create_self_node(), and forgets to delete > the node->mac_list linked in hsr->self_node_db. ...

[PATCH net] net: hsr: fix memory leak in hsr_dev_finalize()

2019-03-06 Thread Mao Wenan
If hsr_add_port(hsr, hsr_dev, HSR_PT_MASTER) failed to add port, it directly returns res and forgets to free the node that allocated in hsr_create_self_node(), and forgets to delete the node->mac_list linked in hsr->self_node_db. BUG: memory leak unreferenced object 0x8881cfa0c780 (size 64):