diff options
author | zhengbin <zhengbin13@huawei.com> | 2019-03-13 11:01:37 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-23 10:44:32 +0300 |
commit | d96e50a53ba106ff845fe8d17300f38f1d3d4536 (patch) | |
tree | 2bf8503a82edd38c24f8a39338c109a8950b5835 | |
parent | f289ac1f6eb2d024793732ddb629595ab85674b7 (diff) | |
download | linux-d96e50a53ba106ff845fe8d17300f38f1d3d4536.tar.xz |
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>
-rw-r--r-- | net/9p/client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/9p/client.c b/net/9p/client.c index 8fba9cd973c1..443db202db09 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -1058,7 +1058,7 @@ struct p9_client *p9_client_create(const char *dev_name, char *options) p9_debug(P9_DEBUG_ERROR, "Please specify a msize of at least 4k\n"); err = -EINVAL; - goto free_client; + goto close_trans; } err = p9_client_version(clnt); |