Skip to content

Commit

Permalink
RDMA/nes: Fix use-after-free in mini_cm_dec_refcnt_listen()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Faisal Latif authored and Roland Dreier committed Feb 27, 2008
1 parent f84fba6 commit a2e9c38
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/infiniband/hw/nes/nes_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a2e9c38

Please sign in to comment.