9p/net: fix memory leak in p9_client_create
authorzhengbin <zhengbin13@huawei.com>
Wed, 13 Mar 2019 08:01:37 +0000 (16:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 12:19:40 +0000 (13:19 +0100)
commitb5d6f47074890c8c02471e5492c5b4d057ce230f
treefa11dd48ae1d91de3c959a6c2adb60f4435cf4f7
parent0a97dbd82f40bcb888110a7d6860bac4a5819502
9p/net: fix memory leak in p9_client_create

commit bb06c388fa20ae24cfe80c52488de718a7e3a53f upstream.

If msize is less than 4096, we should close and put trans, destroy
tagpool, not just free client. This patch fixes that.

Link: http://lkml.kernel.org/m/1552464097-142659-1-git-send-email-zhengbin13@huawei.com
Cc: stable@vger.kernel.org
Fixes: 574d356b7a02 ("9p/net: put a lower bound on msize")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/9p/client.c