[PATCH 2.6 6/8] infiniband/hw/nes/nes_cm.c: Fix use-after-free
From: gstreiff
Date: Thu Feb 21 2008 - 08:33:32 EST
From: Faisal Latif <flatif@xxxxxxxxxxxxx>
Use-after-free spotted by Coverity checker. Flagged by Adrian Bunk.
Signed-off-by: Faisal Latif <flatif@xxxxxxxxxxxxx>
Signed-off-by: Glenn Streiff <gstreiff@xxxxxxxxxxxxx>
---
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 {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/