mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
9p/net: fix memory leak in p9_client_create
commitbb06c388faupstream. 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:574d356b7a("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
be0b155c2b
commit
1cbd3417c4
@@ -1082,7 +1082,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