From: Faisal Latif Date: Thu, 21 Feb 2008 14:27:32 +0000 (-0600) Subject: RDMA/nes: Fix use-after-free in mini_cm_dec_refcnt_listen() X-Git-Tag: v3.12-rc1~22646^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a2e9c384ce76993cd68d6de57eaa81985b4618e3;p=kernel%2Fkernel-generic.git 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 --- 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 {