aboutsummaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/nes
diff options
context:
space:
mode:
authorFaisal Latif <flatif@neteffect.com>2008-02-21 08:27:32 -0600
committerRoland Dreier <rolandd@cisco.com>2008-02-26 16:24:29 -0800
commita2e9c384ce76993cd68d6de57eaa81985b4618e3 (patch)
treeadea958874e4289b400635633b4f6829270de8eb /drivers/infiniband/hw/nes
parentf84fba6f969065c6622669bbaa955c26fc1461ae (diff)
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 <flatif@neteffect.com> Signed-off-by: Glenn Streiff <gstreiff@neteffect.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/nes')
-rw-r--r--drivers/infiniband/hw/nes/nes_cm.c1
1 files changed, 1 insertions, 0 deletions
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 {