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:
parent
f84fba6f96
commit
a2e9c384ce
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue