diff options
author | Latchesar Ionkov <lionkov@gmail.com> | 2010-08-24 18:13:59 +0000 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2010-09-13 08:13:02 -0500 |
commit | 62b2be591a9b12c550308ef7718a31abfc815b50 (patch) | |
tree | d07e2cdfa07fdcc0840d3c1e3209591c085fe1c3 /net | |
parent | 49553c2ef88749dd502687f4eb9c258bb10a4f44 (diff) |
fs/9p, net/9p: memory leak fixes
Four memory leak fixes in the 9P code.
Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/9p/client.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/9p/client.c b/net/9p/client.c index dc6f2f26d02..9eb72505308 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -331,8 +331,10 @@ static void p9_tag_cleanup(struct p9_client *c) } } - if (c->tagpool) + if (c->tagpool) { + p9_idpool_put(0, c->tagpool); /* free reserved tag 0 */ p9_idpool_destroy(c->tagpool); + } /* free requests associated with tags */ for (row = 0; row < (c->max_tag/P9_ROW_MAXTAG); row++) { @@ -944,6 +946,7 @@ struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames, int16_t nwqids, count; err = 0; + wqids = NULL; clnt = oldfid->clnt; if (clone) { fid = p9_fid_create(clnt); @@ -994,9 +997,11 @@ struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames, else fid->qid = oldfid->qid; + kfree(wqids); return fid; clunk_fid: + kfree(wqids); p9_client_clunk(fid); fid = NULL; |