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 <flatif@neteffect.com>
Signed-off-by: Glenn Streiff <gstreiff@neteffect.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
Faisal Latif 2008-02-21 08:27:32 -06:00 committed by Roland Dreier
parent f84fba6f96
commit a2e9c384ce
1 changed files with 1 additions and 0 deletions

View 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 {