From: Faisal Latif <[EMAIL PROTECTED]>

Use-after-free spotted by Coverity checker.  Flagged by Adrian Bunk.

Signed-off-by: Faisal Latif <[EMAIL PROTECTED]>
Signed-off-by: Glenn Streiff <[EMAIL PROTECTED]>

---
 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to