From: Faisal Latif Date: Thu, 21 Feb 2008 14:27:32 +0000 (-0600) Subject: RDMA/nes: Fix use-after-free in mini_cm_dec_refcnt_listen() X-Git-Tag: v2.6.25-rc4~150^2~3 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a2e9c384ce76993cd68d6de57eaa81985b4618e3;p=linux-2.6-omap-h63xx.git RDMA/nes: Fix use-after-free in mini_cm_dec_refcnt_listen() Fix use-after-free spotted by Coverity checker flagged by Adrian Bunk. Signed-off-by: Faisal Latif Signed-off-by: Glenn Streiff Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 78e845c9457..6c298aa9ab0 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c @@ -947,6 +947,7 @@ static int mini_cm_dec_refcnt_listen(struct nes_cm_core *cm_core, nes_debug(NES_DBG_CM, "destroying listener (%p)\n", listener); kfree(listener); + listener = NULL; ret = 0; cm_listens_destroyed++; } else {