[ofa-general] [PATCH 2.6 6/8] infiniband/hw/nes/nes_cm.c: Fix use-after-free
gstreiff at neteffect.com
gstreiff at neteffect.com
Thu Feb 21 06:27:32 PST 2008
From: Faisal Latif <flatif at neteffect.com>
Use-after-free spotted by Coverity checker. Flagged by Adrian Bunk.
Signed-off-by: Faisal Latif <flatif at neteffect.com>
Signed-off-by: Glenn Streiff <gstreiff at neteffect.com>
---
drivers/infiniband/hw/nes/nes_cm.c | 1 +
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 78e845c..6c298aa 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 {
More information about the general
mailing list