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: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
Sean Hefty 2006-12-14 11:22:19 -08:00 коммит произвёл Roland Dreier
Родитель 881a045fc5
Коммит 30a5ec982e
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

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