Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30a5ec98 authored by Sean Hefty's avatar Sean Hefty Committed by Roland Dreier
Browse files

RDMA/ucma: Fix struct ucma_event leak when backlog is full



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: default avatarSean Hefty <sean.hefty@intel.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 881a045f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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--;