diff options
author | Maciej S. Szmigiero <mail@maciej.szmigiero.name> | 2017-01-21 23:50:18 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-25 11:46:42 +0100 |
commit | d2ce4ea1a0b0162e5d2d7e7942ab6f5cc2063d5a (patch) | |
tree | e0473fe2c0aefd9191655f18f52217ec5fd09428 /drivers/w1/w1_netlink.c | |
parent | dd6478d68b16ce3d165b9d0e4ac0c021923e0f5a (diff) | |
download | linux-d2ce4ea1a0b0162e5d2d7e7942ab6f5cc2063d5a.tar.gz linux-d2ce4ea1a0b0162e5d2d7e7942ab6f5cc2063d5a.tar.bz2 linux-d2ce4ea1a0b0162e5d2d7e7942ab6f5cc2063d5a.zip |
w1: don't leak refcount on slave attach failure in w1_attach_slave_device()
Near the beginning of w1_attach_slave_device() we increment a w1 master
reference count.
Later, when we are going to exit this function without actually attaching
a slave device (due to failure of __w1_attach_slave_device()) we need to
decrement this reference count back.
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Cc: stable@vger.kernel.org
Fixes: 9fcbbac5ded489 ("w1: process w1 netlink commands in w1_process thread")
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1/w1_netlink.c')
0 files changed, 0 insertions, 0 deletions