RDMA/nes: Fix a memory leak in schedule_nes_timer()

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>
This commit is contained in:
Adrian Bunk 2008-02-21 08:12:06 -06:00 committed by Roland Dreier
parent 65b07ec293
commit ed0ba33d64
1 changed files with 2 additions and 2 deletions

View File

@ -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;