summaryrefslogtreecommitdiff
path: root/net/9p
diff options
context:
space:
mode:
authorzhengbin <zhengbin13@huawei.com>2019-03-13 11:01:37 +0300
committerDominique Martinet <dominique.martinet@cea.fr>2019-03-13 13:50:04 +0300
commitbb06c388fa20ae24cfe80c52488de718a7e3a53f (patch)
tree895a685a5a80e98886fea7dfde21d273125d6137 /net/9p
parent5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f (diff)
downloadlinux-bb06c388fa20ae24cfe80c52488de718a7e3a53f.tar.xz
9p/net: fix memory leak in p9_client_create
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>
Diffstat (limited to 'net/9p')
-rw-r--r--net/9p/client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index 357214a51f13..b85d51f4b8eb 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -1061,7 +1061,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);