diff options
| author | Qiushi Wu <wu000273@umn.edu> | 2020-05-27 22:10:29 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-06-03 08:19:49 +0200 |
| commit | 8a37da1359ffbf7ae5600b552bfd7fd57057cb68 (patch) | |
| tree | 434c418e0f5e5f5ec12914aa1aa4817ba2f08da9 /include/linux | |
| parent | 3219344fabbdef3eaee14b83dce3223608f43aab (diff) | |
bonding: Fix reference count leak in bond_sysfs_slave_add.
commit a068aab42258e25094bc2c159948d263ed7d7a77 upstream.
kobject_init_and_add() takes reference even when it fails.
If this function returns an error, kobject_put() must be called to
properly clean up the memory associated with the object. Previous
commit "b8eb718348b8" fixed a similar problem.
Fixes: 07699f9a7c8d ("bonding: add sysfs /slave dir for bond slave devices.")
Signed-off-by: Qiushi Wu <wu000273@umn.edu>
Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
