mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
phonet: refcount leak in pep_sock_accep
commit bcd0f93353326954817a4f9fa55ec57fb38acbb0 upstream. sock_hold(sk) is invoked in pep_sock_accept(), but __sock_put(sk) is not invoked in subsequent failure branches(pep_accept_conn() != 0). Signed-off-by: Hangyu Hua <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Aayush Agarwal <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
db0c834abb
commit
2a6a811a45
1 changed files with 1 additions and 0 deletions
|
|
@ -868,6 +868,7 @@ static struct sock *pep_sock_accept(struct sock *sk, int flags, int *errp,
|
|||
|
||||
err = pep_accept_conn(newsk, skb);
|
||||
if (err) {
|
||||
__sock_put(sk);
|
||||
sock_put(newsk);
|
||||
newsk = NULL;
|
||||
goto drop;
|
||||
|
|
|
|||
Loading…
Reference in a new issue