Skip to content

Commit

Permalink
RDMA/nes: Fix a memory leak in schedule_nes_timer()
Browse files Browse the repository at this point in the history
Fix a memory leak spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Glenn Streiff <gstreiff@neteffect.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Adrian Bunk authored and Roland Dreier committed Feb 27, 2008
1 parent 65b07ec commit ed0ba33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/infiniband/hw/nes/nes_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,11 @@ int schedule_nes_timer(struct nes_cm_node *cm_node, struct sk_buff *skb,
int ret = 0;
u32 was_timer_set;

if (!cm_node)
return -EINVAL;
new_send = kzalloc(sizeof(*new_send), GFP_ATOMIC);
if (!new_send)
return -1;
if (!cm_node)
return -EINVAL;

/* new_send->timetosend = currenttime */
new_send->retrycount = NES_DEFAULT_RETRYS;
Expand Down

0 comments on commit ed0ba33

Please sign in to comment.