[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1552464097-142659-1-git-send-email-zhengbin13@huawei.com>
Date: Wed, 13 Mar 2019 16:01:37 +0800
From: zhengbin <zhengbin13@...wei.com>
To: <ericvh@...il.com>, <lucho@...kov.net>, <asmadeus@...ewreck.org>,
<davem@...emloft.net>, <v9fs-developer@...ts.sourceforge.net>,
<netdev@...r.kernel.org>
CC: <houtao1@...wei.com>, <yi.zhang@...wei.com>
Subject: [PATCH] 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.
Fixes: 574d356b7a02 ("9p/net: put a lower bound on msize")
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: zhengbin <zhengbin13@...wei.com>
---
net/9p/client.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/9p/client.c b/net/9p/client.c
index 357214a..b85d51f 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);
--
2.7.4
Powered by blists - more mailing lists