X-Git-Url: https://bbs.cooldavid.org/git/?a=blobdiff_plain;f=net%2F9p%2Fclient.c;h=b5e1aa8d718e1a3f8e72e33f2e4099b96c30c46d;hb=69259abb64d4da77273bf59accfc9fa79e7165f4;hp=f34b9f5108189feec49f80b2f5b024bc43a4bae4;hpb=dd53df265b1ee7a1fbbc76bb62c3bec2383bbd44;p=net-next-2.6.git diff --git a/net/9p/client.c b/net/9p/client.c index f34b9f51081..b5e1aa8d718 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;