Skip to content

Commit

Permalink
9p/net: fix memory leak in p9_client_create
Browse files Browse the repository at this point in the history
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: 574d356 ("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]>
  • Loading branch information
zhengbin13 authored and Dominique Martinet committed Mar 13, 2019
1 parent 5e3cc1e commit bb06c38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/9p/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bb06c38

Please sign in to comment.