Skip to content

Commit bb06c38

Browse files
zhengbin13Dominique Martinet
authored andcommitted
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: 574d356 ("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>
1 parent 5e3cc1e commit bb06c38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/9p/client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ struct p9_client *p9_client_create(const char *dev_name, char *options)
10611061
p9_debug(P9_DEBUG_ERROR,
10621062
"Please specify a msize of at least 4k\n");
10631063
err = -EINVAL;
1064-
goto free_client;
1064+
goto close_trans;
10651065
}
10661066

10671067
err = p9_client_version(clnt);

0 commit comments

Comments
 (0)