Commit a2e9c384 authored by Faisal Latif's avatar Faisal Latif Committed by Roland Dreier

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: default avatarFaisal Latif <flatif@neteffect.com>
Signed-off-by: default avatarGlenn Streiff <gstreiff@neteffect.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent f84fba6f
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment