mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
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/[email protected]
Cc: [email protected]
Fixes: 574d356b7a ("9p/net: put a lower bound on msize")
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: zhengbin <[email protected]>
Signed-off-by: Dominique Martinet <[email protected]>
This commit is contained in:
1 parent
5e3cc1ee14
commit
bb06c388fa
1 file changed
+1
-1
+1
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user