From a2e9c384ce76993cd68d6de57eaa81985b4618e3 Mon Sep 17 00:00:00 2001 From: Faisal Latif Date: Thu, 21 Feb 2008 08:27:32 -0600 Subject: [PATCH] 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 --- drivers/infiniband/hw/nes/nes_cm.c | 1 + 1 file changed, 1 insertion(+) 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 { -- 2.41.1