[openib-general] [PATCH] 2.6.20 rdma_ucm: fix struct ucma_event leak

Sean Hefty sean.hefty at intel.com
Thu Dec 14 11:22:19 PST 2006


We discard new connection requests while the listen backlog is full,
but leak a struct ucma_event in the process.  Free the structure.

Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c
index f51b755..ace2cad 100644
--- a/drivers/infiniband/core/ucma.c
+++ b/drivers/infiniband/core/ucma.c
@@ -209,6 +209,7 @@ static int ucma_event_handler(struct rdm
 	if (event->event == RDMA_CM_EVENT_CONNECT_REQUEST) {
 		if (!ctx->backlog) {
 			ret = -EDQUOT;
+			kfree(uevent);
 			goto out;
 		}
 		ctx->backlog--;





More information about the general mailing list