]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/9p/client.c
p9: Fix leak of waitqueue in request allocation path
[linux-2.6-omap-h63xx.git] / net / 9p / client.c
index 26ca8ab451966b1e11a6914e106815f0b844b7e2..b56d808e63a98505b3e448f10351726a789c93a0 100644 (file)
@@ -189,6 +189,9 @@ static struct p9_req_t *p9_tag_alloc(struct p9_client *c, u16 tag)
                        printk(KERN_ERR "Couldn't grow tag array\n");
                        kfree(req->tc);
                        kfree(req->rc);
+                       kfree(req->wq);
+                       req->tc = req->rc = NULL;
+                       req->wq = NULL;
                        return ERR_PTR(-ENOMEM);
                }
                req->tc->sdata = (char *) req->tc + sizeof(struct p9_fcall);