Commit 43af8532ecd74a61f9e7aeb27c026c1ee27915ca
Committed by
David S. Miller
1 parent
9a732ed6d0
bridge: fix error handling in br_add_if()
When device is added to bridge its refcnt is incremented (in new_nbp()), but if error occurs during further br_add_if() operations this counter is not decremented back. Fix it by adding dev_put() call in the error path. Signed-off-by: Volodymyr G Lukiianyk <volodymyrgl@gmail.com> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 4 additions and 1 deletions Side-by-side Diff
net/bridge/br_if.c