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-Url: https://git.stricted.de/?a=commitdiff_plain;h=a2e9c384ce76993cd68d6de57eaa81985b4618e3;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.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 78e845c94576..6c298aa9ab05 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 {