IB/rxe: avoid srq memory leak
authorZhu Yanjun <yanjun.zhu@oracle.com>
Sun, 30 Sep 2018 06:27:16 +0000 (02:27 -0400)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 3 Oct 2018 22:03:36 +0000 (16:03 -0600)
commitaae0484e15f062ad2c2502e68e15dfb8b8f84608
treeb6a52926a9eaebce304dab267d8de55363b873dd
parent39f2495618c5e980d2873ea3f2d1877dd253e07a
IB/rxe: avoid srq memory leak

In rxe_queue_init, q and q->buf are allocated. In do_mmap_info, q->ip is
allocated. When error occurs, rxe_srq_from_init and the later error
handler do not free these allocated memories.  This will make memory leak.

Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/sw/rxe/rxe_srq.c