IB/srpt: Don't return freed pointer from srpt_alloc_ioctx_ring()
authorJesper Juhl <jj@chaosbits.net>
Sat, 4 Feb 2012 22:49:40 +0000 (23:49 +0100)
committerRoland Dreier <roland@purestorage.com>
Mon, 6 Feb 2012 16:57:11 +0000 (08:57 -0800)
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/srpt/ib_srpt.c

index c125614..2b73d43 100644 (file)
@@ -687,6 +687,7 @@ err:
        while (--i >= 0)
                srpt_free_ioctx(sdev, ring[i], dma_size, dir);
        kfree(ring);
+       ring = NULL;
 out:
        return ring;
 }