]> git.baikalelectronics.ru Git - kernel.git/commit
rxrpc: Fix rxrpc_peer leak in rxrpc_look_up_bundle()
authorEiichi Tsukata <eiichi.tsukata@nutanix.com>
Sun, 21 Nov 2021 04:16:07 +0000 (04:16 +0000)
committerDavid Howells <dhowells@redhat.com>
Mon, 29 Nov 2021 15:39:40 +0000 (15:39 +0000)
commitdaebdc0b4d564e61ebbad359c3127b10c1f9de64
tree905ec8e2da586f4a8eedbf21504c56f3553b7a9e
parentcba3db94881cd22423316e26219b28f303477092
rxrpc: Fix rxrpc_peer leak in rxrpc_look_up_bundle()

Need to call rxrpc_put_peer() for bundle candidate before kfree() as it
holds a ref to rxrpc_peer.

[DH: v2: Changed to abstract out the bundle freeing code into a function]

Fixes: b92e7b804746 ("rxrpc: Rewrite the client connection manager")
Signed-off-by: Eiichi Tsukata <eiichi.tsukata@nutanix.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Link: https://lore.kernel.org/r/20211121041608.133740-1-eiichi.tsukata@nutanix.com/
net/rxrpc/conn_client.c