[PATCH] IB: Don't return freed pointer fromsrpt_alloc_ioctx_ring()

From: Jesper Juhl
Date: Sat Feb 04 2012 - 17:49:19 EST


Signed-off-by: Jesper Juhl <jj@xxxxxxxxxxxxx>
---
drivers/infiniband/ulp/srpt/ib_srpt.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

compile tested only.

diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index cd5d05e..a59c685 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -687,6 +687,7 @@ err:
while (--i >= 0)
srpt_free_ioctx(sdev, ring[i], dma_size, dir);
kfree(ring);
+ ring = NULL;
out:
return ring;
}
--
1.7.9


--
Jesper Juhl <jj@xxxxxxxxxxxxx> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/