From: Jesper Juhl Date: Sat, 4 Feb 2012 22:49:40 +0000 (+0100) Subject: IB/srpt: Don't return freed pointer from srpt_alloc_ioctx_ring() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=715252d41912941efb791a7b7bad94d2614dc5c3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git IB/srpt: Don't return freed pointer from srpt_alloc_ioctx_ring() Signed-off-by: Jesper Juhl Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index c125614ac256..2b73d43cd691 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; }