]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
RDMA/ucma: Fix struct ucma_event leak when backlog is full
authorSean Hefty <sean.hefty@intel.com>
Thu, 14 Dec 2006 19:22:19 +0000 (11:22 -0800)
committerRoland Dreier <rolandd@cisco.com>
Mon, 8 Jan 2007 04:17:34 +0000 (20:17 -0800)
We discard new connection requests while the listen backlog is full,
but leak a struct ucma_event in the process.  Free the structure in
this case.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/ucma.c

index 81a5cdc5733aa4f5372d2fbaa173489f132cd1c9..9f30f9bffc61c4dab682c337c48ace2ccb8e430a 100644 (file)
@@ -209,6 +209,7 @@ static int ucma_event_handler(struct rdma_cm_id *cm_id,
        if (event->event == RDMA_CM_EVENT_CONNECT_REQUEST) {
                if (!ctx->backlog) {
                        ret = -EDQUOT;
+                       kfree(uevent);
                        goto out;
                }
                ctx->backlog--;