RDMA/qedr: Fix memory leak in iWARP CM
authorAlok Prasad <palok@marvell.com>
Wed, 21 Oct 2020 11:50:08 +0000 (11:50 +0000)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 28 Oct 2020 12:45:25 +0000 (09:45 -0300)
Fixes memory leak in iWARP CM

Fixes: e411e0587e0d ("RDMA/qedr: Add iWARP connection management functions")
Link: https://lore.kernel.org/r/20201021115008.28138-1-palok@marvell.com
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Alok Prasad <palok@marvell.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/qedr/qedr_iw_cm.c

index c7169d2..c4bc587 100644 (file)
@@ -727,6 +727,7 @@ int qedr_iw_destroy_listen(struct iw_cm_id *cm_id)
                                                    listener->qed_handle);
 
        cm_id->rem_ref(cm_id);
+       kfree(listener);
        return rc;
 }