net: tipc: fix possible refcount leak in tipc_sk_create()
authorHangyu Hua <hbh25y@gmail.com>
Wed, 29 Jun 2022 06:34:18 +0000 (14:34 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Jun 2022 12:49:06 +0000 (13:49 +0100)
commit00aff3590fc0a73bddd3b743863c14e76fd35c0c
tree3f65507f2ff0bcea5b8c57dfbbee5baa811d8aeb
parent5a478a653b4cca148d5c89832f007ec0809d7e6d
net: tipc: fix possible refcount leak in tipc_sk_create()

Free sk in case tipc_sk_insert() fails.

Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Reviewed-by: Tung Nguyen <tung.q.nguyen@dektech.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c