Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed0ba33d authored by Adrian Bunk's avatar Adrian Bunk Committed by Roland Dreier
Browse files

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



Fix a memory leak spotted by the Coverity checker.

Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
Signed-off-by: default avatarGlenn Streiff <gstreiff@neteffect.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 65b07ec2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;