]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
RDMA/nes: Fix use-after-free in mini_cm_dec_refcnt_listen()
authorFaisal Latif <flatif@neteffect.com>
Thu, 21 Feb 2008 14:27:32 +0000 (08:27 -0600)
committerRoland Dreier <rolandd@cisco.com>
Wed, 27 Feb 2008 00:24:29 +0000 (16:24 -0800)
Fix use-after-free spotted by Coverity checker flagged by Adrian Bunk.

Signed-off-by: Faisal Latif <flatif@neteffect.com>
Signed-off-by: Glenn Streiff <gstreiff@neteffect.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/nes/nes_cm.c

index 78e845c945761d4dc3d590d51d1a0607e48fef3d..6c298aa9ab05a06e7c8945f54bbef2f03d42a8c3 100644 (file)
@@ -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 {